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

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