Commit db5de1a8 authored by Valentin Samir's avatar Valentin Samir

[sip] Scripts appelé par asterisk dans un sous dossier

parent 4060df40
Contient des script appelé par asterisk qui lit leur résultat sur stdin
#!/usr/bin/env python
#!/bin/bash /usr/scripts/python.sh
# -*- coding: utf-8 -*-
import sys
from asterisk import Profile
from sip.asterisk import Profile
if __name__ == '__main__' :
if len(sys.argv)>1:
......
#!/usr/bin/env python
#!/bin/bash /usr/scripts/python.sh
# -*- coding: utf-8 -*-
import sys
from asterisk import Profile
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")
sys.stdout.write(profile.num_to_callerid(sys.argv[1]))
else:
print >> sys.stderr, "Usage %s {user}" % sys.argv[0]
\ No newline at end of file
print >> sys.stderr, "Usage %s {user}" % sys.argv[0]
#!/usr/bin/env python
#!/bin/bash /usr/scripts/python.sh
# -*- coding: utf-8 -*-
import sys
from asterisk import Profile
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.update_pin(sys.argv[2], sys.argv[3])
else:
print >> sys.stderr, "Usage %s {seed} {number} {pin}" % sys.argv[0]
\ No newline at end of file
print >> sys.stderr, "Usage %s {seed} {number} {pin}" % sys.argv[0]
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