12 lines
No EOL
350 B
Python
Executable file
12 lines
No EOL
350 B
Python
Executable file
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import sys
|
|
from asterisk import Profile
|
|
|
|
if __name__ == '__main__' :
|
|
if len(sys.argv)>1:
|
|
profile = Profile("dbname='django' user='crans' host='pgsql.adm.crans.org'", "voip_profile")
|
|
sys.stdout.write(profile.num_to_callerid(sys.argv[1]))
|
|
else:
|
|
print >> sys.stderr, "Usage %s {user}" % sys.argv[0] |