Hi,

Our message is: 
Mr. João Seu seguro automóvel MM3A308720 caduca hoje. Contacte-nos
227280210/220 ou visite-nos numa de nossas agências para activar a nova
apólice.  (147 characters)

Our goal is to send it as concatenated Unicode and use UTF-8 as that is what
Clickatell accepts.
Questions - do we use padding?
The only case of (Sent. Message splits: 3) is from Sending to Kannel not
using padding, leave out charset below.  But it arrives *some text missing*
2061206E6F7661206170C3B36C963652E and not a Unicode message.  
Is there a bug in Kannel code for Clickatell or are we doing something
incorrect?

Result is: 
4D722E204A6FC3A36F205365752073656775726F206175746F6DC3B376656C204D4D33413330
383732302063616475636120686F6A652E20436F6E74616374652D6E6F732032323732383032
31302F323230206F75207669736974652D6E6F73206E756D61206465206E6F73736173206167
C3AA6E63696173207061726120616374697661722061206E6F7661206170C3B36C6963652E

If we use padding:

004d0072002e0020004a006f00e3006f0020005300650075002000730065006700750072006f
0020006100750074006f006d00f300760065006c0020004d004d003300410033003000380037
00320030002000630061006400750063006100200068006f006a0065002e00200043006f006e
00740061006300740065002d006e006f00730020003200320037003200380030003200310030
002f0032003200300020006f00750020007600690073006900740065002d006e006f00730020
006e0075006d00610020006400650020006e006f007300730061007300200061006700ea006e
0063006900610073002000700061007200610020006100630074006900760061007200200061
0020006e006f0076006100200061007000f3006c006900630065002e

Sending to Kannel not using padding, leave out charset:

[root@messaging ~]# lynx -dump
'http://localhost:13013/cgi-bin/sendsms?username=xxxx&password=yyyy&to=24492
3472222&from=Company&text=4D722E204A6FC3A36F205365752073656775726F206175746F
6DC3B376656C204D4D33413330383732302063616475636120686F6A652E20436F6E74616374
652D6E6F73203232373238303231302F323230206F75207669736974652D6E6F73206E756D61
206465206E6F73736173206167C3AA6E63696173207061726120616374697661722061206E6F
7661206170C3B36C6963652E&coding=2&smsc=clickatell'

   Sent. Message splits: 3

Sending to Kannel not using padding, put in charset:

[root@messaging ~]# lynx -dump
'http://localhost:13013/cgi-bin/sendsms?username=xxxx&password=yyyy&to=24492
3472222&from=Company&text=4D722E204A6FC3A36F205365752073656775726F206175746F
6DC3B376656C204D4D33413330383732302063616475636120686F6A652E20436F6E74616374
652D6E6F73203232373238303231302F323230206F75207669736974652D6E6F73206E756D61
206465206E6F73736173206167C3AA6E63696173207061726120616374697661722061206E6F
7661206170C3B36C6963652E&charset=utf-8&coding=2&smsc=clickatell'

   Sent. Message splits: 5

Sending to Kannel using padding, leave out charset:

[root@messaging ~]# lynx -dump
'http://localhost:13013/cgi-bin/sendsms?username=xxxx&password=yyyy&to=24492
3472222&from=Company&text=004d0072002e0020004a006f00e3006f002000530065007500
2000730065006700750072006f0020006100750074006f006d00f300760065006c0020004d00
4d00330041003300300038003700320030002000630061006400750063006100200068006f00
6a0065002e00200043006f006e00740061006300740065002d006e006f007300200032003200
37003200380030003200310030002f0032003200300020006f00750020007600690073006900
740065002d006e006f00730020006e0075006d00610020006400650020006e006f0073007300
61007300200061006700ea006e00630069006100730020007000610072006100200061006300
740069007600610072002000610020006e006f0076006100200061007000f3006c0069006300
65002e&coding=2&smsc=clickatell'

   Sent. Message splits: 5

Sending to Kannel using padding, include charset:

[root@messaging ~]# lynx -dump
'http://localhost:13013/cgi-bin/sendsms?username=xxxx&password=yyyy&to=24492
3472222&from=Company&text=004d0072002e0020004a006f00e3006f002000530065007500
2000730065006700750072006f0020006100750074006f006d00f300760065006c0020004d00
4d00330041003300300038003700320030002000630061006400750063006100200068006f00
6a0065002e00200043006f006e00740061006300740065002d006e006f007300200032003200
37003200380030003200310030002f0032003200300020006f00750020007600690073006900
740065002d006e006f00730020006e0075006d00610020006400650020006e006f0073007300
61007300200061006700ea006e00630069006100730020007000610072006100200061006300
740069007600610072002000610020006e006f0076006100200061007000f3006c0069006300
65002e&charset=utf-8&coding=2&smsc=clickatell'

   Sent. Message splits: 9


-----Original Message-----
From: Alexander Malysh [mailto:malys...@googlemail.com] On Behalf Of
Alexander Malysh
Sent: 28 January 2011 11:01 AM
To: Hillel
Cc: de...@kannel.org
Subject: Re: [bug] clickatell unicode HTTP code for Kannel

Hi Hillel,

I don't see any bug at this point in time because you just wrong submitted
UTF16 message to Kannel.
if you send message via sendsms interface and tell kannel that coding=2 that
kannel expects to see message
body encoded as UTF16. If I look at your example with lynx this is not a
case.

Please try with coding=2 and text encoded as UTF16...

Thanks,
Alexander Malysh

Am 27.01.2011 um 16:52 schrieb Hillel:

> Hi,
> 
> We have been testing with concatenated Unicode SMSs and decided to try the
> Kannel code for Clickatell.  There seems to be a bug. Version of Kannel:
> svn-r4850M
> Has anyone found this bug and created a patch for it?
> We also emailed this directly to Clickatell.
> The HTTP Code for Clickatell works fine for a non-unicode SMS.
> Unless there is patch, we would advise people to not send Unicode via
> Clickatell and Kannel.
> 
> Message to convert to Unicode:
> Sr Eduardo Seu seguro automóvel 4191 caduca 2011/01/08 para renovar
contacte
> 227280019/220 ou visite uma das nossas agências
> 
> Message sent directly to Kannel using the Clickatell HTTP code in Kannel:
> lynx -dump
>
'http://localhost:13013/cgi-bin/sendsms?username=xxxxx&password=xxxxxx&to=%2
> B27737613111&from=yyyyy&text=Sr Eduardo Seu seguro automóvel 4191 caduca
> 2011/01/08 para renovar contacte 227280019/220 ou visite uma das nossas
> agências&coding=2&charset=UTF-16BE&smsc=clickatell'
> 
> From Kannel Logs: Bearerbox log we see (The password is replaced with
> xxxxx):
> 2010-12-18 23:50:20 [25479] [32] DEBUG: HTTP[clickatell]: Sending request
>
<http://api.clickatell.com/http/sendmsg?to=%2B27737613111&from=yyyyy&api_id=
>
xxxxxx&user=ecomm&password=xxxxx&callback=3&req_feat=48&cliMsgId=b0a6a37975c
>
d46fa83c849a3a4bb61c0&unicode=1&text=5372204564756172646F2053657520736567757
>
26F206175746F6DF376656C20343139312063616475636120323031312F30312F30382070617
>
2612072656E6F76617220636F6E7461637465203232373238303031392F323230206F7520766
> 97369746520756D6120646173206E6F73736173206167EA6E63696173>
> 
> The unicode that Kannel generates and sends to Clickatell is incorrect.  
> It looks like UTF8 but it's not (see the end of the unicode)
> 
> UTF-8:
>
5372204564756172646f205365752073656775726f206175746f6dc3b376656c203431393120
>
63616475636120323031312f30312f303820706172612072656e6f76617220636f6e74616374
>
65203232373238303031392f323230206f752076697369746520756d6120646173206e6f7373
> 6173206167c3aa6e63696173
> 
> UTF-16BE
>
005300720020004500640075006100720064006f002000530065007500200073006500670075
>
0072006f0020006100750074006f006d00f300760065006c0020003400310039003100200063
>
0061006400750063006100200032003000310031002f00300031002f00300038002000700061
>
00720061002000720065006e006f00760061007200200063006f006e00740061006300740065
>
0020003200320037003200380030003000310039002f0032003200300020006f007500200076
>
0069007300690074006500200075006d006100200064006100730020006e006f007300730061
> 007300200061006700ea006e0063006900610073
> 
> Kannel Configuration for Clickatell:
> 
> # SMSC CONNECTIONS
> group = smsc
> smsc = http
> smsc-id = clickatell
> system-type = clickatell
> allowed-smsc-id = clickatell
> port = 13015
> smsc-username = yyyyy
> smsc-password = xxxxx
> #On Clickatell its the api_id
> system-id = yyy
> #smsbox-id = dlrbox
> send-url = "http://api.clickatell.com/http";
> #connect-allow-ip = "*.*.*.*"
> #callback = 3
> connect-allow-ip = "127.0.0.1;x.y.z.a"
> status-success-regex = "ok"
> status-permfail-regex = "failure"
> status-tempfail-regex = "retry later"
> 
> Regards
> 
> 
> 
> 
> 


Reply via email to