I have Kannel (cvs version) running fine on my Ubuntu server. I am somewhat
befuddled by what I am experiencing with mysql-dlr setup. I was under the
impression that sms messages sent or received would be matched by a
correspondending record insertion into the the dlr table; in my case this
doesn't appear to be, even though my Kannel was properly compiled with mysql
support. When I receive an sms message via my GSM modem, no record insertion is
made into the dlr table and likewise when I send an sms message through a python
script no record insertion is made either as I thought would happen. Though
here, if you look at my python script (below) you will notice I am passing a
number of key/value items to the dlr-url parameter which I can grab through a
python script and write to a database when sending an sms. If I have to take
this approach I just question the need for mysql-dlr compilation if I can grab
and write the values with my own script. Is this how dlr-mysql support works in
Kannel? If someone could bring me into perspective here I would be grateful.
Still trying to understand the Kannel terrain. Thanks

James
#############################################################
#!/usr/bin/python

import sys
import urllib
import re

p = urllib.urlencode({'username': 'smsman', 'password': 'karooland', 'to': t,
'text': x, 'dlr-mask': 31, 'dlr-url':
'http://www.xyz.co.za/dlr/grabdlr/?status=%d&smsc-id=%i&answer=%A&to=%p&from=%P&ts=%t&service=%n'})
f = urllib.urlopen(u % p)
print f.read()
f.close()



Reply via email to