Re: How to send in another encoding
2016-01-22 19:54 GMT+03:00 Deins: > 1) I use Kannel 1.4.3 from Debian repo. I will try to install latest > stable version if nothing helps. > 2) All tables in my database already was utf8, but to be sure I'm executed: > ALTER TABLE send_sms CONVERT TO CHARACTER SET utf8; > ... > 3) yes, it is > 4) coding=2, charset=utf8 > > > 5) now I have "empty square" characters on my phone. > As I said before you need to use latest version from SVN or version 1.4.4 (which is stable and released), althrough SVN version is considered to be production ready and have most of the bugs fixed. You need to use SVN version of sqlbox as well as kannel. In version 1.4.3 and 1.5.0 (previous DEV version) there was a bug related to UCS-2 characters conversion which was fixed 2 years ago or so, so just use SVN version it's best and it's not hard to compile. > > On 01/22/2016 06:30 PM, spameden wrote: > > To get proper cyrillic or any UCS-2 text on your handset: > > 1) Make sure you use latest kannel version from SVN (compile it yourself) > > 2) execute in MySQL: > ALTER table send_sms charset=utf8 > ALTER table sent_sms charset=utf8 > ALTER table dlr charset=utf8 > So all your tables will be in utf8 encoding. > > 3) When you insert text into send_sms table you need to make sure text is > in UTF-8 encoding and urlencoded. > > 4) set coding=2 and charset='utf8', NOTE: each MT will be limited to 70 > symbols. If you use concatenated MT each part will be limited to 69 symbols. > > 5) This way you'll get proper text on your handset. > > About msgdata field in sent_sms table: text is double urlencoded, I think > it's either a bug in kannel or feature (?). Text is urlencoded to avoid all > hassle to deal with many encodings out there, because for every encoding > you'd need proper escaping, this way kannel deals with escaping. If you > really need to preserve original text (AS IS) you need to modify kannel's > source code as well as sqlbox, which can be tricky OR as a workaround you > can have another table where you INSERT your text as well and save it for > billing purposes (e.g. billing table) > > Generally speaking: both send_sms and sent_sms tables are kinda temporary > tables (at least I keep only 24 hours records there so kannel operates > quickly, because it still depends on MySQL answer). > > You can set a TRIGGER on sent_sms table and get updated your other billing > table. > > 2016-01-22 14:08 GMT+03:00 Deins : > >> I need to send sms with a cyrillic symbols. I write sql query with a >> field coding=2. >> In the send_sms table I see right value of the msgdata field. But in >> sent_sms table all characters transforms into 3F3F3F string. How to >> deal with it? >> >> > >
How to send in another encoding
I need to send sms with a cyrillic symbols. I write sql query with a field coding=2. In the send_sms table I see right value of the msgdata field. But in sent_sms table all characters transforms into 3F3F3F string. How to deal with it?
Re: How to send in another encoding
To get proper cyrillic or any UCS-2 text on your handset: 1) Make sure you use latest kannel version from SVN (compile it yourself) 2) execute in MySQL: ALTER table send_sms charset=utf8 ALTER table sent_sms charset=utf8 ALTER table dlr charset=utf8 So all your tables will be in utf8 encoding. 3) When you insert text into send_sms table you need to make sure text is in UTF-8 encoding and urlencoded. 4) set coding=2 and charset='utf8', NOTE: each MT will be limited to 70 symbols. If you use concatenated MT each part will be limited to 69 symbols. 5) This way you'll get proper text on your handset. About msgdata field in sent_sms table: text is double urlencoded, I think it's either a bug in kannel or feature (?). Text is urlencoded to avoid all hassle to deal with many encodings out there, because for every encoding you'd need proper escaping, this way kannel deals with escaping. If you really need to preserve original text (AS IS) you need to modify kannel's source code as well as sqlbox, which can be tricky OR as a workaround you can have another table where you INSERT your text as well and save it for billing purposes (e.g. billing table) Generally speaking: both send_sms and sent_sms tables are kinda temporary tables (at least I keep only 24 hours records there so kannel operates quickly, because it still depends on MySQL answer). You can set a TRIGGER on sent_sms table and get updated your other billing table. 2016-01-22 14:08 GMT+03:00 Deins: > I need to send sms with a cyrillic symbols. I write sql query with a field > coding=2. > In the send_sms table I see right value of the msgdata field. But in > sent_sms table all characters transforms into 3F3F3F string. How to > deal with it? > >
Re: How to send in another encoding
1) I use Kannel 1.4.3 from Debian repo. I will try to install latest stable version if nothing helps. 2) All tables in my database already was utf8, but to be sure I'm executed: ALTER TABLE send_sms CONVERT TO CHARACTER SET utf8; ... 3) yes, it is 4) coding=2, charset=utf8 5) now I have "empty square" characters on my phone. On 01/22/2016 06:30 PM, spameden wrote: To get proper cyrillic or any UCS-2 text on your handset: 1) Make sure you use latest kannel version from SVN (compile it yourself) 2) execute in MySQL: ALTER table send_sms charset=utf8 ALTER table sent_sms charset=utf8 ALTER table dlr charset=utf8 So all your tables will be in utf8 encoding. 3) When you insert text into send_sms table you need to make sure text is in UTF-8 encoding and urlencoded. 4) set coding=2 and charset='utf8', NOTE: each MT will be limited to 70 symbols. If you use concatenated MT each part will be limited to 69 symbols. 5) This way you'll get proper text on your handset. About msgdata field in sent_sms table: text is double urlencoded, I think it's either a bug in kannel or feature (?). Text is urlencoded to avoid all hassle to deal with many encodings out there, because for every encoding you'd need proper escaping, this way kannel deals with escaping. If you really need to preserve original text (AS IS) you need to modify kannel's source code as well as sqlbox, which can be tricky OR as a workaround you can have another table where you INSERT your text as well and save it for billing purposes (e.g. billing table) Generally speaking: both send_sms and sent_sms tables are kinda temporary tables (at least I keep only 24 hours records there so kannel operates quickly, because it still depends on MySQL answer). You can set a TRIGGER on sent_sms table and get updated your other billing table. 2016-01-22 14:08 GMT+03:00 Deins>: I need to send sms with a cyrillic symbols. I write sql query with a field coding=2. In the send_sms table I see right value of the msgdata field. But in sent_sms table all characters transforms into 3F3F3F string. How to deal with it?
Message Panic
Dear all, We have some kannel SMSC connections work well. Recently, we see in the log SMSBox the following panic message. Kannel is stopped and must be restarted. [12160] [4] PANIC: gwlib/octstr.c:2481: seems_valid_real: Assertion `ostr != NULL' failed. (Called from gwlib/octstr.c:836:octstr_convert_range.)[12160] [4] PANIC: /usr/local/sbin/smsbox(gw_panic+0xbc) [0x808762c] [12160] [4] PANIC: /usr/local/sbin/smsbox [0x8087f5b] [12160] [4] PANIC: /usr/local/sbin/smsbox(octstr_convert_range+0x31) [0x80884a1] [12160] [4] PANIC: /usr/local/sbin/smsbox(urltrans_find+0x5f) [0x8064c3f] [12160] [4] PANIC: /usr/local/sbin/smsbox [0x805c269] [12160] [4] PANIC: /usr/local/sbin/smsbox [0x807d9ad] [12160] [4] PANIC: /lib/i686/cmov/libpthread.so.0 [0xb77674c0] [12160] [4] PANIC: /lib/i686/cmov/libc.so.6(clone+0x5e) [0xb73c26de] What can be happening with kannel? What I can adjust or change the configuration? Waiting for your reply. Thanks! -- Amílcar Mendoza Consorcio Unplugged, C.A. Dep. Operaciones Teléfono: (0212) 740-30-80 al 83 Ext.: 7769