Re: Sqlbox DCS problem
Semion Spivak <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Jorge, Assuming your bearerbox is configured to accept smsbox connections on port 13001 ( smsbox-port = 13001 ), then you need to configure sqlbox with the following parameters: group = sqlbox id = sqlbox bearerbox-host = 127.0.0.1 bearerbox-port = 13001 smsbox-port = 13002 ... rest of the sqlbox config file ... This means that sqlbox connects to bearerbox on port 13001 and listens to other boxes on port 13002. Then, in your kannel.conf, go to the section "group = smsbox", and set bearerbox-port = 13002. This way smsbox will be connected to sqlbox. Those questions are more suited to ask at [email protected], or can be answered reading the Kannel userguide ( http://www.kannel.org/download/kannel-userguide-snapshot/userguide.html ) and sqlbox userguide ( http://www.blogalex.com/wp-content/uploads/2008/11/userguide.html ). On 03/01/2012 20:08, Jorge Raimundo wrote: > Hi Semion! > > Thanks for your reply! > > How exactly should I configure smsbox and sqlbox to act like you > describe? I'm sorry to ask you this, but I'm a newbie to kannel and I'm > still discovering how all the pieces fit together. > > Best regards, > Jorge > > On Tue, Jan 3, 2012 at 5:51 PM, Semion Spivak <[email protected] > <mailto:[email protected]>> wrote: > > __ Hi Jorge, > > To check what should be put to the database, try to connect sqlbox > as following: > > Smsbox <-> sqlbox <-> bearerbox > > Then, send a test sms via http request to smsbox, providing it with > dlr-mask=31 and dlr-url containing url-encoded values. The sqlbox > should create a correct sql row in the db and pass the message to > the bearerbox. Also, turn on the sql logging in your db before you > check it, to catch the insert command. > > -- > Sent from my Android phone with K-9 Mail. Please excuse my brevity. > > > Jorge Raimundo <[email protected] > <mailto:[email protected]>> wrote: > > Hi all! > > I'm using sqlbox to send messages via SMPP, but I'm getting a > very strange problem. > > I've decided to use smsbox to handle the DLR via the dlr_url. > > So let me see if I can explain all the situations occurring. > > *1st insertion on the database:* > INSERT INTO send_sms( momt, sender, receiver, msgdata, sms_type, > dlr_mask, dlr_url) VALUES ('MT', 'MV', '+3519******67', 'Hello > world', 2, 31, > 'http://my_domain/services/teste.php?type=%d%destination=91******7' > <http://my_domain/services/teste.php?type=%d%destination=91******7%27>); > > As you can see, the URL has an error (it should have > type=%d&destination instead of type=%d%destination). This ended > up in having a DLR with the status of 8 (!?) not properly > registered by the php script since the url is malformed. > > *2nd insertion on the database:* > INSERT INTO send_sms( momt, sender, receiver, msgdata, sms_type, > dlr_mask, dlr_url) VALUES ('MT', 'MV', '+3519******67', 'Hello > world', 2, 31, > 'http://my_domain/services/teste.php?type=%d&destination=91******7' > <http://my_domain/services/teste.php?type=%d&destination=91******7%27>); > > This ended up in having a DLR with the status of 16 properly > registered by my php script (yes, it works with the dlr_url not > encoded). > > At this point I contacted the support of my provider to know why > they where rejecting my messages. They told me that the messages > where being sent with DCS=216. They told me to set DCS to 1 if > I'm sending 7-bit messages or DCS to 3 or 0 if I'm submitting > ISO (8-bit message). > > In fact on the smsc log I have this: data_coding: 216 = 0x000000d8 > > *3rd insertion on the database:* > Wondering why the change on the dlr_url gave different DLR > status, I made the following > INSERT INTO send_sms( momt, sender, receiver, msgdata, sms_type, > dlr_mask, dlr_url) VALUES ('MT', 'MV', '+3519******67', 'Hello > world', 2, 31, '7'); > > This ended up in having a DLR with the status of 0. Yes, I > received the message, but... the text was this: 䡥汬漠睯牬搀 > > The smsc log still gives: data_coding: 216 = 0x000000d8 > > *4th insertion on the database:* > Testing what would happen if I passed a URL encoded dlr_url > INSERT INTO send_sms( momt, sender, receiver, msgdata, sms_type, > dlr_mask, dlr_url) VALUES ('MT', 'MV', '+3519******67', 'Hello > world', 2, 31, > 'http%3A%2F%2Fmy_domain%2Fservices%2Fteste.php%3Ftype%3D%25d%26destination%3D91******7'); > > This ended up in having a DLR with the status of 0. I received > the same text: 䡥汬漠睯牬搀 > The smsc log still gives: data_coding: 216 = 0x000000d8 > The smsbox complains that: > ERROR: URL > <http%3A%2F%2Fmy_domain%2Fservices%2Fteste.php%3Ftype%3D%25d%26destination%3D91******7> > doesn't start with `http://' nor `https://' > ERROR: Couldn't send request to > <http%3A%2F%2Fmy_domain%2Fservices%2Fteste.php%3Ftype%3D%25d%26destination%3D91******7> > > *Summarizing:* > I don't know what's happening here. > Different values of the dlr_url cause different SMSC reactions > to the request. > The DCS value is strange and I'm getting Chinese characters when > I should receive a "Hello world". > > Anyone could, please, point out what I am missing here? > > -- > > Multivision *Jorge Raimundo > * > RAN Consultant | [email protected] > <mailto:[email protected]> > . > Rua António Albino Machado, Nº33, 2ºB. > S. Domingos de Benfica, 1600 - 870 Lisboa > Fixed PT:+351 21 155 20 53 <tel:%2B351%2021%20155%2020%2053> | > Mobile PT:+351 91 933 13 67 <tel:%2B351%2091%20933%2013%2067> > www.multivision.pt <http://www.multivision.pt/> > > > > > > -- > > Multivision *Jorge Raimundo > * > RAN Consultant | [email protected] > <mailto:[email protected]> > . > Rua António Albino Machado, Nº33, 2ºB. > S. Domingos de Benfica, 1600 - 870 Lisboa > Fixed PT:+351 21 155 20 53 | Mobile PT:+351 91 933 13 67 > www.multivision.pt <http://www.multivision.pt/> > > -- Regards, Semion Spivak SmsCoin.com Technical support.