Ha ha… No worries.
Dear Davor, Let me try your suggestions and get back to you… Appreciate your kind support and thank you for the demonstration done yesterday. Regards, Rasika Udayanga From: Davor Spasoski [mailto:davor.spaso...@onevip.mk] Sent: Monday, August 26, 2019 9:21 PM To: Rasika Udayanga; 'vinayak mv' Cc: users@kannel.org Subject: RE: Send "Sinhala" Letters (Unicode) via Kannel XML Post BTW, sorry for misspelling Sinhala. Singha beer is to blame for that ;) BR, Davor From: Davor Spasoski Sent: Monday, August 26, 2019 3:33 PM To: 'Rasika Udayanga' <ras...@bellvantage.com <mailto:ras...@bellvantage.com> >; 'vinayak mv' <vinayakvasu...@gmail.com <mailto:vinayakvasu...@gmail.com> > Cc: users@kannel.org <mailto:users@kannel.org> Subject: RE: Send "Sinhala" Letters (Unicode) via Kannel XML Post Dear Rasika, Your Singha characters work well on my environent with the following curl syntax: curl -X POST \ http://10.1.19.5:4004/cgi-bin/sendsms \ -H 'cache-control: no-cache' \ -H 'content-type: text/xml' \ -H 'postman-token: dc4ba5cb-28ca-b9bc-5ab2-9c3369add9db' \ -d '<?xml version="1.0" encoding="utf-8"?> <message> <submit> <da><number>+94777289868</number></da> <oa><number>Source</number></oa> <ud>රසික</ud><dcs> <coding>2</coding> <mclass>1</mclass> </dcs> <from> <username>****</username> <password>****</password> </from> </submit> </message>' Davor Spasoski M: +38975400608 e-mail: davor.spaso...@onevip.mk <mailto:davor.spaso...@onevip.mk> one.Vip DOOEL Skopje | Ploshtad Presveta Bogorodica 1 | 1000 Skopje | Macedonia Member of A1 Telekom Austria Group From: Rasika Udayanga <ras...@bellvantage.com <mailto:ras...@bellvantage.com> > Sent: Monday, August 26, 2019 2:13 PM To: Davor Spasoski <davor.spaso...@onevip.mk <mailto:davor.spaso...@onevip.mk> >; 'vinayak mv' <vinayakvasu...@gmail.com <mailto:vinayakvasu...@gmail.com> > Cc: users@kannel.org <mailto:users@kannel.org> Subject: RE: Send "Sinhala" Letters (Unicode) via Kannel XML Post Dear Davor, Vinayak, Thank you and appreciate your responses. Dear Davor, Yes I set the content type in the header and below is my C# cording as how I does it. but the message is delivered as garbage letters. string xmlMessage = "<?xml version=\"1.0\"?>\r\n" + "<message><submit><da><number>94777289868</number></da><oa><number>94115753753</number></oa><ud>%E0%B6%BB%E0%B7%83%E0%B7%92%E0%B6%9A</ud><dcs><coding>2</coding><mclass>1</mclass></dcs><from><username>******</username><password>******</password></from></submit></message>"; string url = "http://10.9.8.25:13013/cgi-bin/sendsms"; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); byte[] requestInFormOfBytes = System.Text.Encoding.ASCII.GetBytes(xmlMessage); request.Method = "POST"; request.ContentType = "text/xml"; request.ContentLength = requestInFormOfBytes.Length; Stream requestStream = request.GetRequestStream(); requestStream.Write(requestInFormOfBytes, 0, requestInFormOfBytes.Length); requestStream.Close(); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); StreamReader respStream = new StreamReader(response.GetResponseStream(), System.Text.Encoding.Default); string receivedResponse = respStream.ReadToEnd(); Console.WriteLine(receivedResponse); respStream.Close(); response.Close(); Dear Vinayak, I tried the same a long time ago and failed. Have you tried doing it with MSSQL. Regards, Rasika Udayanga. From: vinayak mv [mailto:vinayakvasu...@gmail.com] Sent: Saturday, August 24, 2019 10:34 PM To: Davor Spasoski Cc: Rasika Udayanga; users@kannel.org <mailto:users@kannel.org> Subject: Re: Send "Sinhala" Letters (Unicode) via Kannel XML Post Better use sqlbox for bulk sending On Sat, 24 Aug 2019 at 10:04 PM, Davor Spasoski <davor.spaso...@onevip.mk <mailto:davor.spaso...@onevip.mk> > wrote: Hi, I’m rarely using Postman for simple HTTP calls. Try using curl -H BTW, kannel does state that you need to set the content type in a header not the xml payload and you should do so with the enoding as in the xm example, the encoding is not set within the xml. "Note: Don't forget to set POST Content-Type to text/xml!" On Aug 24, 2019, at 14:34, Rasika Udayanga <ras...@bellvantage.com <mailto:ras...@bellvantage.com> > wrote: Dear Davor, I’m kind of confused. Please correct me if I’m wrong. As per the Kannal user guide I should send an XML document when I do POST for bulk sending. Please refer below screenshot of the Postman that I’m trying to send the request through. <image001.jpg> When I try to use text/html instead of text/xml smsbox failed with below PANIC errors. 2019-08-24 17:17:06 [27859] [3] INFO: smsbox: Got HTTP request </cgi-bin/sendsms> from <192.168.51.100> 2019-08-24 17:17:06 [27859] [3] DEBUG: Status: 403 Answer: <Authorization failed for sendsms> 2019-08-24 17:17:06 [27859] [3] PANIC: gwlib/octstr.c:2504: seems_valid_real: Assertion `ostr->data != NULL' failed. (Called from gwlib/octstr.c:325:octstr_destroy.) 2019-08-24 17:17:06 [27859] [3] PANIC: /usr/local/sbin/smsbox(gw_panic+0x147) [0x43c0b7] 2019-08-24 17:17:06 [27859] [3] PANIC: /usr/local/sbin/smsbox() [0x43d2f0] 2019-08-24 17:17:06 [27859] [3] PANIC: /usr/local/sbin/smsbox(octstr_destroy+0x1d) [0x43f2dd] 2019-08-24 17:17:06 [27859] [3] PANIC: /usr/local/sbin/smsbox() [0x412784] 2019-08-24 17:17:06 [27859] [3] PANIC: /usr/local/sbin/smsbox() [0x43331e] 2019-08-24 17:17:06 [27859] [3] PANIC: /lib64/libpthread.so.0(+0x7a51) [0x7fc246380a51] 2019-08-24 17:17:06 [27859] [3] PANIC: /lib64/libc.so.6(clone+0x6d) [0x7fc24590c93d] Please help me to understand where I go wrong. Appreciate if you can share me a working sample of the XML POST that I can test with. Regards, Rasika Udayanga From: Davor Spasoski [ <mailto:davor.spaso...@onevip.mk> mailto:davor.spaso...@onevip.mk] Sent: Saturday, August 24, 2019 1:47 PM To: Rasika Udayanga Cc: <mailto:users@kannel.org> users@kannel.org Subject: Re: Send "Sinhala" Letters (Unicode) via Kannel XML Post Did you try declaring the encoding in the HTTP POST header like this: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> ? On Aug 24, 2019, at 08:01, Rasika Udayanga < <mailto:ras...@bellvantage.com> ras...@bellvantage.com> wrote: Dear Davor Thank you and appreciate your prompt response. Yes, as shown below I tried without url encoding the payload and even removing the encoding tag from the XML document. BUT STILL NO LUCK <?xml version = "1.0" encoding="UTF-8" standalone = "no" ?> <message> <submit> <da><number>94777289868</number></da> <oa><number>94115753753</number></oa> <ud>රසික</ud> <dcs><coding>1</coding><mclass>1</mclass></dcs> <from> <username>bellvantage</username> <password>password@123</password> </from> </submit> </message> Please assist. Sent on the move. Please excuse typos. On Aug 23, 2019, at 8:11 PM, Davor Spasoski < <mailto:davor.spaso...@onevip.mk> davor.spaso...@onevip.mk> wrote: Have you tried not url-encoding the payload? Your form may already encode the entire xml. Davor On Aug 23, 2019, at 14:12, Rasika Udayanga < <mailto:ras...@bellvantage.com> ras...@bellvantage.com> wrote: Hello, I’m trying to send Sinhala (Sri Lankan) letters through Kannel and that works perfectly with GET method with coding 2 and charset utf-8 <http://10.9.8.25:13013/cgi-bin/sendsms?username=******&password=******&to=94777289868&from=94115753753&priority=0&text=%E0%B6%BB%E0%B7%83%E0%B7%92%E0%B6%9A&coding=2&charset=utf-8> http://10.9.8.25:13013/cgi-bin/sendsms?username=******&password=******&to=94777289868&from=94115753753&priority=0&text=%E0%B6%BB%E0%B7%83%E0%B7%92%E0%B6%9A&coding=2&charset=utf-8 Have you tried not url-encoding the payload? Your form may already encode the entire xml. Davor On Aug 23, 2019, at 14:12, Rasika Udayanga < <mailto:ras...@bellvantage.com> ras...@bellvantage.com> wrote: Hello, I’m trying to send Sinhala (Sri Lankan) letters through Kannel and that works perfectly with GET method with coding 2 and charset utf-8 <http://10.9.8.25:13013/cgi-bin/sendsms?username=******&password=******&to=94777289868&from=94115753753&priority=0&text=%E0%B6%BB%E0%B7%83%E0%B7%92%E0%B6%9A&coding=2&charset=utf-8> http://10.9.8.25:13013/cgi-bin/sendsms?username=******&password=******&to=94777289868&from=94115753753&priority=0&text=%E0%B6%BB%E0%B7%83%E0%B7%92%E0%B6%9A&coding=2&charset=utf-8 When I try to send as a XML Post as shown below (having message text url-encoded and without encoded), the messages are delivered to IPhone BUT NOT DELIVERED TO ANDROID PHONES. Can someone please assist me as to where I’m doing wrong here. <?xml version = "1.0" encoding="UTF-8" standalone = "no" ?> <message> <submit> <da><number>94777289868</number></da> <oa><number>94115753753</number></oa> <ud>%E0%B6%BB%E0%B7%83%E0%B7%92%E0%B6%9A</ud> <dcs><coding>1</coding><mclass>1</mclass></dcs> <from> <username>bellvantage</username> <password>password@123</password> </from> </submit> </message> <?xml version = "1.0" encoding="UTF-8" standalone = "no" ?> <message> <submit> <da><number>94777289868</number></da> <oa><number>94115753753</number></oa> <ud>රසික</ud> <dcs><coding>1</coding><mclass>1</mclass></dcs> <from> <username>bellvantage</username> <password>password@123</password> </from> </submit> </message> Regards, Rasika Udayanga 0777289868 _____ Disclaimer: one.Vip DOOEL Skopje This e-mail (including any attachments) is confidential and may be protected by legal privilege. If you are not the intended recipient, you should not copy it, re-transmit it, use it or disclose its contents, but should return it to the sender immediately and delete your copy from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. one.Vip DOOEL Skopje shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system. Please, do not print this e-mail unless it is necessary! Think about saving the environment! Напомена: оне.Вип ДООЕЛ Скопје Оваа електронска порака (вклучувајќи ги и прилозите) е доверлива и може да биде заштитена со правни привилегии. Доколку не сте лицето на кое таа му е наменета пораката, не треба да ја копирате, дистрибуирате или да ја откривате нејзината содржина, туку веднаш да ја препратите до испраќачот и да ја избришете оригиналната порака и сите нејзини копии од Вашиот компјутерски систем. Секое неовластено користење на оваа порака во целост или делови од истата е строго забрането. Ве молиме да забележите дека електронските пораки се подложни на промени. оне.Вип ДООЕЛ Скопје не презема одговорност за несоодветно или нецелосно пренесување на информациите содржани во оваа комуникација, ниту пак за било какво задоцнување на приемот или оштетувања на вашиот систем. Ве молиме не ја печатете оваа порака освен ако не е неопходно! Зачувајте ја природата! _____ Disclaimer: one.Vip DOOEL Skopje This e-mail (including any attachments) is confidential and may be protected by legal privilege. If you are not the intended recipient, you should not copy it, re-transmit it, use it or disclose its contents, but should return it to the sender immediately and delete your copy from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. one.Vip DOOEL Skopje shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system. Please, do not print this e-mail unless it is necessary! Think about saving the environment! Напомена: оне.Вип ДООЕЛ Скопје Оваа електронска порака (вклучувајќи ги и прилозите) е доверлива и може да биде заштитена со правни привилегии. Доколку не сте лицето на кое таа му е наменета пораката, не треба да ја копирате, дистрибуирате или да ја откривате нејзината содржина, туку веднаш да ја препратите до испраќачот и да ја избришете оригиналната порака и сите нејзини копии од Вашиот компјутерски систем. Секое неовластено користење на оваа порака во целост или делови од истата е строго забрането. Ве молиме да забележите дека електронските пораки се подложни на промени. оне.Вип ДООЕЛ Скопје не презема одговорност за несоодветно или нецелосно пренесување на информациите содржани во оваа комуникација, ниту пак за било какво задоцнување на приемот или оштетувања на вашиот систем. Ве молиме не ја печатете оваа порака освен ако не е неопходно! Зачувајте ја природата! _____ Disclaimer: one.Vip DOOEL Skopje This e-mail (including any attachments) is confidential and may be protected by legal privilege. If you are not the intended recipient, you should not copy it, re-transmit it, use it or disclose its contents, but should return it to the sender immediately and delete your copy from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. one.Vip DOOEL Skopje shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system. Please, do not print this e-mail unless it is necessary! Think about saving the environment! Напомена: оне.Вип ДООЕЛ Скопје Оваа електронска порака (вклучувајќи ги и прилозите) е доверлива и може да биде заштитена со правни привилегии. Доколку не сте лицето на кое таа му е наменета пораката, не треба да ја копирате, дистрибуирате или да ја откривате нејзината содржина, туку веднаш да ја препратите до испраќачот и да ја избришете оригиналната порака и сите нејзини копии од Вашиот компјутерски систем. Секое неовластено користење на оваа порака во целост или делови од истата е строго забрането. Ве молиме да забележите дека електронските пораки се подложни на промени. оне.Вип ДООЕЛ Скопје не презема одговорност за несоодветно или нецелосно пренесување на информациите содржани во оваа комуникација, ниту пак за било какво задоцнување на приемот или оштетувања на вашиот систем. Ве молиме не ја печатете оваа порака освен ако не е неопходно! Зачувајте ја природата! -- Thanks & Regards, Vinayak ====================================================================== Confucius once said, "Life is really simple, but we insist on making it complicated." Leonardo da Vinci once said, "Simplicity is the ultimate sophistication." Albert Einstein once said, "Everything should be made as simple as possible, but not simpler." _____ Disclaimer: one.Vip DOOEL Skopje This e-mail (including any attachments) is confidential and may be protected by legal privilege. If you are not the intended recipient, you should not copy it, re-transmit it, use it or disclose its contents, but should return it to the sender immediately and delete your copy from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. one.Vip DOOEL Skopje shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system. Please, do not print this e-mail unless it is necessary! Think about saving the environment! Напомена: оне.Вип ДООЕЛ Скопје Оваа електронска порака (вклучувајќи ги и прилозите) е доверлива и може да биде заштитена со правни привилегии. Доколку не сте лицето на кое таа му е наменета пораката, не треба да ја копирате, дистрибуирате или да ја откривате нејзината содржина, туку веднаш да ја препратите до испраќачот и да ја избришете оригиналната порака и сите нејзини копии од Вашиот компјутерски систем. Секое неовластено користење на оваа порака во целост или делови од истата е строго забрането. Ве молиме да забележите дека електронските пораки се подложни на промени. оне.Вип ДООЕЛ Скопје не презема одговорност за несоодветно или нецелосно пренесување на информациите содржани во оваа комуникација, ниту пак за било какво задоцнување на приемот или оштетувања на вашиот систем. Ве молиме не ја печатете оваа порака освен ако не е неопходно! Зачувајте ја природата!