Hi
I believe it is. Although I have no idea how to verify this? The configuration is being done on a remote computer to which I have to ssh? In the log file it gives a DLR routing for smsc id <ID> disabled warning. I don't know if this could be why the script is not being processed. Here's the log file: 2010-05-26 17:27:51 [4684] [0] INFO: Added logfile `/tmp/kannel.log' with level `0'. 2010-05-26 17:27:51 [4684] [0] INFO: Started access logfile `/tmp/access.log'. 2010-05-26 17:27:51 [4684] [0] INFO: HTTP: Opening server at port 13010. 2010-05-26 17:27:51 [4684] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) maps to pid 4684. 2010-05-26 17:27:51 [4684] [0] DEBUG: Started thread 1 (gwlib/fdset.c:poller) 2010-05-26 17:27:51 [4684] [2] DEBUG: Thread 2 (gwlib/http.c:server_thread) maps to pid 4684. 2010-05-26 17:27:51 [4684] [0] DEBUG: Started thread 2 (gwlib/http.c:server_thread) 2010-05-26 17:27:51 [4684] [0] DEBUG: Started thread 3 (gw/bb_http.c:httpadmin_run) 2010-05-26 17:27:51 [4684] [0] DEBUG: starting smsbox connection module 2010-05-26 17:27:51 [4684] [3] DEBUG: Thread 3 (gw/bb_http.c:httpadmin_run) maps to pid 4684. 2010-05-26 17:27:51 [4684] [0] INFO: BOXC: 'smsbox-max-pending' not set, using default (100). 2010-05-26 17:27:51 [4684] [4] DEBUG: Thread 4 (gw/bb_boxc.c:sms_to_smsboxes) maps to pid 4684. 2010-05-26 17:27:51 [4684] [0] DEBUG: Started thread 4 (gw/bb_boxc.c:sms_to_smsboxes) 2010-05-26 17:27:51 [4684] [5] DEBUG: Thread 5 (gw/bb_boxc.c:smsboxc_run) maps to pid 4684. 2010-05-26 17:27:51 [4684] [0] DEBUG: Started thread 5 (gw/bb_boxc.c:smsboxc_run) 2010-05-26 17:27:51 [4684] [0] INFO: Set SMS resend frequency to 60 seconds. 2010-05-26 17:27:51 [4684] [0] INFO: SMS resend retry set to unlimited. 2010-05-26 17:27:51 [4684] [0] INFO: DLR rerouting for smsc id <01010101> disabled. 2010-05-26 17:27:51 [4684] [0] INFO: AT2[0828151814]: configuration shows modemtype <wavecom> 2010-05-26 17:27:51 [4684] [0] DEBUG: AT2[0828151814]: Reading modem definitions from </home/mradmin/sms/gateway-1.4.3/gw/smskannel.conf> 2010-05-26 17:27:51 [4684] [0] DEBUG: AT2[0828151814]: Found <1> modems in config 2010-05-26 17:27:51 [4684] [0] INFO: AT2[0828151814]: read modem definition for <Wavecom> Note: The 01010101 has been substituted for a cellphone number. Please let me know if there is anything else you might need. Billions of thank you's for your help BR Aubrey ----- Original Message ----- From: "Rene Kluwen" <[email protected]> To: "Aubrey Oosthuizen" <[email protected]>, [email protected] Cc: [email protected] Sent: Wednesday, June 2, 2010 2:35:32 PM Subject: RE: DLR's to MySQL Wild guess: Is the host “sms-gw” defined in /etc/hosts? Maybe Kannel has problems resolving it. Could you post your Kannel log files (debug level 0)? == Rene From: [email protected] [mailto:[email protected]] On Behalf Of Aubrey Oosthuizen Sent: woensdag 2 juni 2010 13:27 To: [email protected] Cc: [email protected] Subject: DLR's to MySQL Dear developers We are working on implementing Kannel into Zimbra collaboration suite by adding a Zimlet allowing users to send sms' from their mail inbox. So far we have completed the entire send process of the project, the only thing remaining is setting up the DLR logging into a mySQL database. I have read through the user guide numerous times, and have read blog and forums to figure out how to do this. I have come to the following stepped conclusion. 1. Append the dlr-url and dlr-mask to your sendsms-url. This is the method we use, it gets the information from a .pl script and this calls the sendsms script. • URL EXAMPLE: http://sms-gw/dlr.php?sender=$from&subject=$subject&time=$theTime • This URL is however URL encoded. my $dlr-url = http%3A%2F%2Fsms-gw%2Fdlr.php%3Fsender%3D%24from%26subject%3D%24subject%26time%3D%24theTime my $url = ' http://sms-gw:13013/cgi-bin/sendsms?username=tester&password=654321&to= ' . $numbz . '&text='. $text . ' &dlr-mask=31 ' . ' &dlr-url=$dlr-url '; $html = getprint ($url); # ok shoot to kannel to send sms. OR Append add a field to the sendsms-user group in your smskannel.conf file. (Note inserted but not used) group = sendsms-user username=XXX password=XXX concatenation=true name=XXX footer=" XXXX" header= faked-sender=XXX default-sender= default-smsc=smsc max-messages=10 #dlr-url = "http%3A%2F%2Fsms-gw%2Fdlr.php%3Fsender%3D%24from%26subject%3D%24subject%26time%3D%24theTime" #dlr-mask = 31 #user-deny-ip = "" #user-allow-ip = "" 2. Create a php script in localhost/ called dlr.php. I put the script into /var/WWW/ though, although I have no idea which directory localhost/script would call for scripts. Now the script does create logs if you would call it through your browser and pass it the parameters. But the sendsms url does not seem to call it. I have heard that DLR url uses mostly predefined parameters, what are these, and would this affect the data being passed in any way? dlr.php <?PHP $val=$_GET['sender']; $dst=$_GET['subject']; $mask = "31"; <--- Static. doesn't really matter tomuch at the moment, we just want to log all DLR's. $ts=$_GET['time']; mysql_connect("localhost", "XXX", "XXX") or die("Cannot connect"); mysql_select_db("mysql") or die("cannot connect to database"); $dt = date("Y-m-d"); $ti = date("H:i:s"); $timewsha1=$dt." ".$ti; #echo $val; #echo $ts; #echo $dst; $query = "insert into dlr values('$val' ,'$ts' ,'$dst','XXX', 'XXX','URL', '$mask','21','XXX','', '$timewshal')"; $result = mysql_query($query) or die("Queryfailed : " . mysql_error()); ?> 3. Create a MySQL database following this format in some manor. id=mydlr table=dlr field-smsc=smsc field-timestamp=ts field-destination=destination field-source=source field-service=service field-url=url field-mask=mask field-status=status field-boxc-id=boxc Problem: Now the table's in the MySQL database do get filled when the script is called, therefore I do not believe the real problem to be located there. The real problem it seems is that the script is never called, that I do not understand. • Is there something important missing? • Does using predefined variables in the DLR-URL affect anything? • What are these? • Do you require an unique ID for each DLR? • Which method is recomended for adding the DLR-URL or DLR-mask to the sendsms url? • Can there be something missing in the configuration that causes this? If you require the configuration file, please just ask. If there is anything missing. Please do tell. PS: Excuse my bad terminology, I have never done anything like this before. Best Regards Aubrey
