#!/bin/bash /usr/scripts/python.sh
# -*- coding: utf-8 -*-
import sys
from sip.asterisk import Profile

if __name__ == '__main__' :
	if len(sys.argv)>3:
		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]
