scripts/sip/scripts/num_to_callerid
2015-07-03 18:07:12 +02:00

12 lines
371 B
Bash
Executable file

#!/bin/bash /usr/scripts/python.sh
# -*- coding: utf-8 -*-
import sys
from sip.asterisk import Profile
if __name__ == '__main__' :
if len(sys.argv)>1:
profile = Profile("dbname='django' user='crans' host='pgsql.v4.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]