Re: SQLBOX time and foreign_id
2015-08-12 8:03 GMT+03:00 Sergey Yudin ser...@centrcombank.com: 2015-08-07 22:42 GMT+03:00 spameden spame...@gmail.com mailto:spame...@gmail.com: 2015-08-07 22:41 GMT+03:00 spameden spame...@gmail.com mailto:spame...@gmail.com: 2015-08-07 21:06 GMT+03:00 Sergey Yudin ser...@centrcombank.com mailto:ser...@centrcombank.com: Can you give some tips about using charset field ? Provider wants UCS-2BE encoding and database in CP1251 encoding for this you need to use coding=2 and charset='utf-8' and also msgdata=urlencode(utf-8 encoded text) this way you'll get on the handset correct text. make sure to use latest kannel 1.4.4 (you can build it as well from SVN, SVN is production ready). About cp1251 i have no idea, since I'm always using UTF-8. But you can try replacing UTF-8 with CP1251 and encoding text in CP1251. Not sure if it'd work. 2 more questions about sqlbox fields: * What fields of SMS_SENT dlr records indicates, that Delivery is OK ? Or should I parse msgdata field for provider reply ? On stock sqlbox status of the sent_sms is in the DLR record (momt='DLR') in sent_sms table in dlr_mask field. dlr_mask can be: 1 == sent 2 == error 8 == buffered (means submitted to smsc) 16 == blocked by smsc for all statuses you can check kannel guide (i don't remember them all now) for status = 2 there is usually some extended info in msgdata of DLR record. I'd recommend adding status field to the sent_sms and just updating relevant MT record with info from arriving DLR and not keeping DLR record at all because it's not needed. Here is how I do it myself: when DLR record arrives I'm just updating MT record with the same dlr_url (dlr_url is generated automatically when you insert MT into table) setting status, number of parts in original MT and updating meta_data field (which im not using) with msgdata from DLR. you'd need to modify both kannel and sqlbox to achieve this. in the end to get certain MT status I just query sent_sms table and check for status field. but if you don't want to touch kannel's source code or not very familiar with C you can add a trigger on MySQL and update table the same way I believe or add some external http script for processing via same dlr_url functionality. * How to interpret field ts (field-timestamp) in DLR table ? Is it unixtime in hex ? No, ts filed in dlr table is a foreign id of MT at SMSC. Some SMSC providers use UNIX_TIMESTAMP though as foreign id, but not everyone. Though, you can add create_date to dlr table to track down when DLR has arrived, e.g. (for MySQL): ALTER table `dlr` add column create_date timestamp default CURRENT_TIMESTAMP; -- Regards..
Re: SQLBOX time and foreign_id
2015-08-07 22:42 GMT+03:00 spameden spame...@gmail.com mailto:spame...@gmail.com: 2015-08-07 22:41 GMT+03:00 spameden spame...@gmail.com mailto:spame...@gmail.com: 2015-08-07 21:06 GMT+03:00 Sergey Yudin ser...@centrcombank.com mailto:ser...@centrcombank.com: Can you give some tips about using charset field ? Provider wants UCS-2BE encoding and database in CP1251 encoding for this you need to use coding=2 and charset='utf-8' and also msgdata=urlencode(utf-8 encoded text) this way you'll get on the handset correct text. make sure to use latest kannel 1.4.4 (you can build it as well from SVN, SVN is production ready). About cp1251 i have no idea, since I'm always using UTF-8. But you can try replacing UTF-8 with CP1251 and encoding text in CP1251. Not sure if it'd work. 2 more questions about sqlbox fields: * What fields of SMS_SENT dlr records indicates, that Delivery is OK ? Or should I parse msgdata field for provider reply ? * How to interpret field ts (field-timestamp) in DLR table ? Is it unixtime in hex ? -- Regards..
SQLBOX time and foreign_id
Dear Kannel People I am using Bearer + SQLBOX with Oracle database. SENT_SMS table contains TIME and FOREIGN_ID fields but they are empty for sent messages with Momt='MT'. Why bearer/sqlbox dosent feel it ? For instance bearer_access log have FID number for sent SMSs. === Sent SMS [SMSC:tim] [SVC:] [ACT:] [BINF:] [FID:602c58ee]... === It will be very helpfull if time and foreign_id fields are filled -- Regards..
Re: SQLBOX time and foreign_id
2015-08-07 16:16 GMT+03:00 Sergey Yudin ser...@centrcombank.com: Dear Kannel People I am using Bearer + SQLBOX with Oracle database. SENT_SMS table contains TIME and FOREIGN_ID fields but they are empty for sent messages with Momt='MT'. Why bearer/sqlbox dosent feel it ? foreign_id is the ID smsc gives you. time field is not empty if you filled it with some value. to track message you should use dlr_url field you can achieve this via various techniques: 1) trigger in Oracle 2) put something unique in dlr_url thus you can connect with incoming DLR message 3) you can use external http call via script update what you need For instance bearer_access log have FID number for sent SMSs. === Sent SMS [SMSC:tim] [SVC:] [ACT:] [BINF:] [FID:602c58ee]... === It will be very helpfull if time and foreign_id fields are filled -- Regards..
Re: SQLBOX time and foreign_id
Always copy list, so others would benefit from solution too. 2015-08-07 22:42 GMT+03:00 spameden spame...@gmail.com: 2015-08-07 22:41 GMT+03:00 spameden spame...@gmail.com: 2015-08-07 21:06 GMT+03:00 Sergey Yudin ser...@centrcombank.com: Can you give some tips about using charset field ? Provider wants UCS-2BE encoding and database in CP1251 encoding for this you need to use coding=2 and charset='utf-8' and also msgdata=urlencode(utf-8 encoded text) this way you'll get on the handset correct text. make sure to use latest kannel 1.4.4 (you can build it as well from SVN, SVN is production ready). About cp1251 i have no idea, since I'm always using UTF-8. But you can try replacing UTF-8 with CP1251 and encoding text in CP1251. Not sure if it'd work. -- Regards