Better use sqlbox for bulk sending
On Sat, 24 Aug 2019 at 10:04 PM, Davor Spasoski <[email protected]> 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 <[email protected]> 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:[email protected] > <[email protected]>] > *Sent:* Saturday, August 24, 2019 1:47 PM > *To:* Rasika Udayanga > *Cc:* [email protected] > *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 <[email protected]> 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 <[email protected]> > 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 <[email protected]> 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 > 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 <[email protected]> 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 > > 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.*"
