[sip] Factorisation et mise au propre des scripts pour asterisk

This commit is contained in:
Valentin Samir 2013-06-16 21:58:47 +02:00
parent 9b5c5eb93d
commit 399bf75dbe
20 changed files with 475 additions and 201 deletions

11
sip/update_pin Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from 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.update_pin(sys.argv[2], sys.argv[3])
else:
print >> sys.stderr, "Usage %s {seed} {number} {pin}" % sys.argv[0]