Commit 7ca15d75 authored by Daniel Stan's avatar Daniel Stan

sip: se connecte à pgsql.v4

parent 32136b25
......@@ -5,7 +5,7 @@ from sip.asterisk import History
if __name__ == '__main__' :
if len(sys.argv)>1:
history = History("dbname='django' user='crans' host='pgsql.adm.crans.org'", "voip_history", 99)
history = History("dbname='django' user='crans' host='pgsql.v4.adm.crans.org'", "voip_history", 99)
if sys.argv[1] == "add":
if len(sys.argv)>4:history.add(sys.argv[2], sys.argv[3], sys.argv[4])
else:print >> sys.stderr, "Usage %s %s {id} {src} {dst}" % (sys.argv[0], sys.argv[1])
......
......@@ -5,7 +5,7 @@ from sip.asterisk import Sms
if __name__ == '__main__' :
if len(sys.argv)>4:
sms=Sms("dbname='django' user='crans' host='pgsql.adm.crans.org'", "voip_sms")
sms=Sms("dbname='django' user='crans' host='pgsql.v4.adm.crans.org'", "voip_sms")
sms.sms_delay(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], body_type='base64')
else:
print >> sys.stderr, "Usage %s {from} {to} {body_base64} {user}" % sys.argv[0]
......@@ -6,7 +6,7 @@ from sip.asterisk import Profile
if __name__ == '__main__' :
if len(sys.argv)>1:
profile = Profile("dbname='django' user='crans' host='pgsql.adm.crans.org'", "voip_profile")
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]
......@@ -5,7 +5,7 @@ from sip.asterisk import Profile
if __name__ == '__main__' :
if len(sys.argv)>3:
profile = Profile("dbname='django' user='crans' host='pgsql.adm.crans.org'", "voip_profile")
profile = Profile("dbname='django' user='crans' host='pgsql.v4.adm.crans.org'", "voip_profile")
profile.update_pin(sys.argv[2], sys.argv[3])
else:
print >> sys.stderr, "Usage %s {seed} {number} {pin}" % sys.argv[0]
......@@ -49,5 +49,5 @@ if __name__ == '__main__':
except IndexError:
sys.stderr.write("Pas utilisateur trouvé pour %s\n" % args.dst)
sys.exit(1)
sms=Sms("dbname='django' user='crans' host='pgsql.adm.crans.org'", "voip_sms")
sms=Sms("dbname='django' user='crans' host='pgsql.v4.adm.crans.org'", "voip_sms")
sms.send(dst, sys.stdin.read(), src)
......@@ -6,5 +6,5 @@ import sys
from gestion import secrets_new as secrets
if __name__ == '__main__' :
sms=Sms("dbname='django' user='crans' host='pgsql.adm.crans.org'", "voip_sms")
sms=Sms("dbname='django' user='crans' host='pgsql.v4.adm.crans.org'", "voip_sms")
sms.sms_daemon('localhost', 5038, 'sms', secrets.get('asterisk_sms_passwd'))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment