Hi Jovan *1. kannel version, how did you compile it and the configuration file* As far as I know the kannel details from our status page is: Kannel bearerbox version `cvs-20090417'. Build `Apr 20 2009 21:08:49', compiler `4.1.2 20080704 (Red Hat 4.1.2-44)'. System Linux, release 2.6.18-128.1.10.el5PAE, version #1 SMP Thu May 7 11:14:31 EDT 2009, machine i686. Hostname localhost, IP 127.0.0.1. Libxml version 2.6.26. Using OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008. Compiled with MySQL 5.0.45, using MySQL 5.0.45. Using native malloc.
*2. sqlbox version, how did you compile it and the configuration file* Will need to find this out *3. the database insert that you are trying to execute* For the database insert query are you referring to the dlr external storage query? I will be getting more info soon. Thanks Samir On Sun, Jul 12, 2009 at 2:06 PM, Jovan Kostovski <[email protected]> wrote: > Hi Samir, > > It seems that there is a problem with the sqlbox mysql queries execution. > My wild guess is that some quotation mark is not escaped and the sql > statement gets broken. > > I think the best thing to do is to wait for Alejandro Guerrieri, the > maintainer of the sqlbox to > comment on this issue. > > Please provide more information about your setup so that this > situation can be reconstructed: > 1. kannel version, how did you compile it and the configuration file > 2. sqlbox version, how did you compile it and the configuration file > 3. the database insert that you are trying to execute > > > BR, Jovan > ---------- Forwarded message ---------- From: Samir Franciscus <[email protected]> Date: Sun, Jul 12, 2009 at 1:36 PM Subject: Re: DLR's with sms box To: Jovan Kostovski <[email protected]> Cc: [email protected] Hi Jovan Thanks for the speedy response. *My insert statement is as follows:* INSERT INTO send_sms (momt, sender, receiver, msgdata, time, sms_type, dlr_mask, dlr_url) VALUES ('MT', 'IMOBI', '+27820000000', 'test', 1247394353, 2, 31, 'http%3A%2F%2Fm.imobi.co.za %2Fdlr%2Fdlr.php%3Fsmstime%3D1247394353%26accountid%3D4%26smsc%3D%25i%26ts%3D%25t%26destination%3D%25p%26source%3D%25P%26service%3D%25n%26status%3D%25d') *After inserting the record the following sql is executed (by kannel) which is in the logs:* INSERT INTO dlr (smsc, ts, source, destination, service, url, mask, boxc, status) VALUES ('SMS Bind', '4A2DD7CB', 'IMOBI', '+2780000000', '', 'http%3A%2F%2Fm.imobi.co.za%2Fsystem%2Fdlr%2Fdlr.php%3Fsmstime%3D1247394353%26accountid%3D4%26smsc%3D%25i%26ts%3D%25t%26destination%3D%25p%26source%3D%25P%26service%3D%25n%26status%3D%25d', '31', 'sqlbox', '0') INSERT INTO sent_sms (sql_id, momt, sender, receiver, udhdata, msgdata, time, smsc_id, service, account, sms_type, mclass, mwi, coding, compress, validity, deferred, dlr_mask, dlr_url, pid, alt_dcs, rpi, charset, boxc_id, binfo ) VALUES ( NULL, 'DLR', 'IMOBI', '+27820000000', NULL, 'id:1244518347 sub:001 dlvrd:001 submit date:1207091236 done date:1207091236 stat:ACCEPTD err:000 Text:DLVRD TO SMSC INSERT INTO sent_sms (sql_id, momt, sender, receiver, udhdata, msgdata, time, smsc_id, service, account, sms_type, mclass, mwi, coding, compress, validity, deferred, dlr_mask, dlr_url, pid, alt_dcs, rpi, charset, boxc_id, binfo ) VALUES ( NULL, 'DLR', 'IMOBI', '+27820000000', NULL, 'id:1244518347 sub:001 dlvrd:001 submit date:1207091236 done date:1207091236 stat:DELIVRD err:000 Text:DLVRD TO MOBILE The above statements seem to be incomplete. My external dlr storage never seems to be called. I am using the same url as I used before with the sendsms via http. I am not sure if there is a problem with the actual dlr-url value that is inserted into the send_sms table or if there are additional parameters I need to set on that url. *My table structure for send_sms is as follows:* sql_id bigint(20) momt enum('MO', 'MT') sender varchar(20) receiver varchar(20) udhdata blob msgdata text time bigint(20) smsc_id varchar(255) service varchar(255) account varchar(255) id bigint(20) sms_type bigint(20) mclass bigint(20) mwi bigint(20) coding bigint(20) compress bigint(20) validity bigint(20) deferred bigint(20) dlr_mask bigint(20) dlr_url varchar(255) pid bigint(20) alt_dcs bigint(20) rpi bigint(20) charset varchar(255) boxc_id varchar(255) binfo varchar(255) My table structure for sent_sms is as follows: *sql_id bigint(20) momt enum('MO', 'MT', 'DLR') sender varchar(20) receiver varchar(20) udhdata blob msgdata text time bigint(20) smsc_id varchar(255) service varchar(255) account varchar(255) id bigint(20) sms_type bigint(20) mclass bigint(20) mwi bigint(20) coding bigint(20) compress bigint(20) validity bigint(20) deferred bigint(20) dlr_mask bigint(20) dlr_url varchar(255) pid bigint(20) alt_dcs bigint(20) rpi bigint(20) charset varchar(255) boxc_id varchar(255) binfo varchar(255) * Thanks Samir On Sun, Jul 12, 2009 at 9:41 AM, Jovan Kostovski <[email protected]> wrote: > On Sun, Jul 12, 2009 at 1:14 AM, Samir Franciscus<[email protected]> > wrote: > > Not sure if this helps but the following error gets logged to the > > kannel-sqlbox.log > > 2009-07-12 00:39:47 [28684] [2] ERROR: MYSQL: You have an error in your > SQL > > syntax; check the manual that corresponds to your MySQL server version > for > > the right syntax to use near ''id:1241145349 sub:001 dlvrd:001 submit > > date:1207090049 done date:1207090049 sta' at line 1 > > It seems that the sqlbox complains about some data when it reads the record > from > the send_sms table. > > Can you send the sql statement with which you are inserting the > messages in the send_sms table, > and the structure of the send_sms table? > > At first check to see if the your table structure is correct: > http://www.blogalex.com/wp-content/uploads/2008/11/userguide.html#AEN473 > > I think that you might set wrong data type for some field(s). > > BR, Jovan >
