Thanks a mil for that, Rene. I have added the smsbox-id (³sqlbox²) as boxc_id to the insert. I already had smsbox-route¹ configured in the kannel.conf file: group = smsbox-route smsbox-id = sqlbox smsc-id = smpp-provider
I tested and, no joy, still gettting ³Could not route message to smsbox id <0>, smsbox is gone!². I have only one smsbox-id configured. Your suggestions as always most welcome! Michael On 12/7/11 22:18, "Rene Kluwen" <rene.klu...@chimit.nl> wrote: > Whilst inserting your message in sqlbox, use as boxc_id the smsbox-id of your > (real) smsbox. > Besides that, set up a group = smsbox-route to make sure your dlr¹s are going > to the proper smsbox. > > == Rene > > > > From: users-boun...@kannel.org [mailto:users-boun...@kannel.org] On Behalf Of > Michael van der Poel > Sent: Tuesday, 12 July, 2011 22:00 > To: Alejandro Mejia Evertsz > Cc: users@kannel.org > Subject: Re: DLR using a phone [" Could not route message to smsbox id <0>, > smsbox is gone!²] > > Hola Alejandro: > > Thanks for your kind offer. A pair of fresh eyes is always good. You (or > someone else) may spot things that I am overlooking! > > I am sending through sqlbox over SMPP and this is the dlr-url I am using: > > > http://*.*.*.*/cgi-bin/dlr.php?to%3D%25to%26msisdn%3D%25msisdn%26status%3D%25s > tatus%26messagId%3D1008928%26scts%3D%25scts > > [My provider uses the parameters to¹, msisdn¹, status¹ and scts¹ for the > Call Back]. > > I checked the Apache log and everything is 200 OK. A week ago I started trying > using only bearerbox and sqlbox but I have returned to using the smsbox, too. > I keep getting the message ³WARNING: Could not route message to smsbox id <0>, > smsbox is gone!² (see ³LOG smpp-provider² below). > I can see the values from the ³deliver_sm² in that same log: > > ³id:0038791787 su b:001 dlvrd:001 > submit date:1107122104 done date:1107121853 > stat:DELIVRD err:000 text:none² > > But why do I fail to store it? The dlr.php is a very simple one: > >>>> >>> dlr.php <<< > > <?php > include('../../mysql_connect2.php'); > > $messageId=$_GET['messageId']; > $status=$_GET['status']; > > $query ="UPDATE verslag SET status='$status' WHERE id_sms='$messageId'"; > > $result = mysql_query($query) or die("Query failed : " . mysql_error()); > ?> > > Please have a look at the information. Any suggestions most welcome! > > Regards, > > > Michael > > PD La neciedad puede ser una virtud. Ya tengo semanas trabajando en esto! > > > > On 12/7/11 06:38, "Alejandro Mejia Evertsz" <ame...@gua.net> wrote: > >> > Hola Michael, >> > >> > Are you sending through smsbox or mysqlbox? >> > I'm using smsbox, and the URL I'm calling to send the message looks like >> > this: >> > >> > >> http://x.x.x.x:8080/cgi-bin/sendsms?username=mysuername&password=mypassword&t >> o >> <http://x.x.x.x:8080/cgi-bin/sendsms?username=mysuername&password=mypassw >> ord&to> >> > >> =mymobile&text=Hello+world&dlr-mask=31&dlr-url=http://y.y.y.y/dlr.cgi?id=mysms >> > ID%26status=%d >> > Please note the last & (ampersand) is url-encoded, so the script from >> > which I'm calling this URL doesn't think this is another parameter, and >> > not part of "dlr-url". (let me know if I'm not being clear hehehe) >> > >> > This way the dlr will call: >> > http://y.y.y.y/dlr.cgi?id=mysmsID&status=%d >> <http://y.y.y.y/dlr.cgi?id=mysmsID&status=%25d> >> > >> > Are you using Apache to run your dlr.cgi script on y.y.y.y ? >> > If so, you could check your apache logs to see wether you're getting the >> > request from kannel or not. >> > >> > Another thing I use to debug is running bearerbox and smsbox directly >> > from the shell so I'm able to see what kannel is doing, because first of >> > all, you should check if the smsc is posting the dlr to kannel or not. >> > (maybe I should have started by saying this hehehe) >> > >> > Let me know if I can be of any help. >> > >> > Buena suerte! >> > >> > Alejandro >> > >> > On 11/07/2011 10:49 p.m., Michael van der Poel wrote: >>> >> Hi Alejandro, >>> >> >>> >> Sorry, I hadn't seen Nikos's reply. >>> >> I can see the "deliver_sm" with all the information (the "full dlr") in >>> the >>> >> logs but so far I can't manage to capture it into my MySQL table. Tan >>> cerca >>> >> pero tan lejos! Soon I will crack it, though. >>> >> >>> >> Best of luck with your endeavours! >>> >> >>> >> >>> >> Michael >>> >> >>> >> On 12/7/11 04:26, "Alejandro Mejia Evertsz"<ame...@gua.net> wrote: >>> >> >>>> >>> Hi Michael, >>>> >>> >>>> >>> I had this already figured out by reading the UG and experimenting a >>>> >>> little. (maybe more than a little hehehe) >>>> >>> I'm getting the first dlr from the smsc and it's calling my dlr-url >>>> >>> correctly (I made a perl .cgi that get's the parameters and store the >>>> >>> new dlr status on mysql). >>>> >>> So far, I guess we both got to the same place ;) >>>> >>> >>>> >>> My doubt was about the dlr-mask I was using (because I thought I wasn't >>>> >>> requesting smsc the right thing for it to give me full dlrs). >>>> >>> Nikos confirmed that I'm using the right mask, so now I have to strugle >>>> >>> with my operator's smsc. >>>> >>> I guess I'll try the other 2 operators smsc with other sims on the same >>>> >>> phone to check if any of them provide with full dlrs. >>>> >>> >>>> >>> Thanks a lot for the time you took to explain me how dlr-url works. >>>> >>> >>>> >>> Cheers! >>>> >>> >>>> >>> Alejandro >>>> >>> >>>> >>> On 11/07/2011 05:01 p.m., Michael van der Poel wrote: >>>>> >>>> Hi Alejandro, >>>>> >>>> >>>>> >>>> I wish, I could give you the full answer to your question, but I am >>>>> >>>> struggling now for some weeks to recover the full DLR and store it in a >>>>> >>>> MySQL database. I have learned some things in those weeks and I hope, I >>>>> >>>> will >>>>> >>>> finally accomplish it soon. >>>>> >>>> >>>>> >>>> What I have figured out so far, is: >>>>> >>>> >>>>> >>>> - you receive a first DLR (the "submit_sm_resp ") that serves as an >>>>> >>>> acknowledgement from your provider (e.g., 8). This just means, that the >>>>> >>>> provider has received your request to send the SMS; >>>>> >>>> - it is the second DLR (the "deliver_sm" that you are looking for >>>>> where the >>>>> >>>> provider confirms whether the message was actually delivered (or >>>>> whether >>>>> >>>> the >>>>> >>>> attempts to deliver the message failed, the mobile number was >>>>> incorrect, >>>>> >>>> ect.). >>>>> >>>> >>>>> >>>> This second message is delivered over HTTP and you will have to set up a >>>>> >>>> Call Back URL (something like: >>>>>>>> >>>> >>>>>>>> >>>">http://yourserver.com/dlr.php?smscID=%i&dlr=%d&answer=%A&to=%p&fro >>>>>>>> m=%P&ts=%>>>> >>>>>>>> <http://yourserver.com/dlr.php?smscID=%i&dlr=%d&answer=%A&to=%p&from=%P >>>>>>>> &ts=%> >>>>>>>> <http://yourserver.com/dlr.php?smscID=%25i&dlr=%25d&answer=%25A >>>>>>>> &to=%25p&from=%25P&ts=%25%3e%3e%3e%3e> T >>>>> >>>> &smsID=07fceb25372fcc4cb847c7099008500e&charset=%C&kannel_id=%I) >>>>> >>>> >>>>> >>>> This is called the dlr-url which you will have to define in your >>>>> kannel >>>>> >>>> configuration, and on your server you will need a php script, that your >>>>> >>>> provider can call and submit the values of the delivery report to. >>>>> These >>>>> >>>> will come in the form of parameters such as '%p' and '%u' (see pggs. >>>>> 94-95 >>>>> >>>> of the UG). >>>>> >>>> The php script captures these values and stores them in your >>>>> database. This >>>>> >>>> is the bit where I am stuck :-( >>>>> >>>> >>>>> >>>> There is plenty of material in the UG and in the various forums. What >>>>> >>>> beginning Kannel users like you and I miss, is a good description of >>>>> how it >>>>> >>>> all comes together. I am sure that once we have see everything >>>>> working, we >>>>> >>>> will say "Ah, of course!". >>>>> >>>> >>>>> >>>> Anyhow, I hope, the above will help to get you started and maybe the >>>>> >>>> experts >>>>> >>>> can correct me where I am wrong. >>>>> >>>> >>>>> >>>> >>>>> >>>> Regards, >>>>> >>>> >>>>> >>>> >>>>> >>>> >>>>> >>>> >>>>> >>>> Michael >>>>> >>>> >>>>> >>>> >>>>> >>>> >>>>> >>>> On 11/7/11 23:17, "Alejandro Mejia Evertsz"<ame...@gua.net> wrote: >>>>> >>>> >>>>>> >>>>> Hello everyone. >>>>>> >>>>> Excuse me for this dumb question, but I got lost on the UG >>>>>> regarding this. >>>>>> >>>>> I'm using an LG phone and I have MT and MO working fine. >>>>>> >>>>> When sending a message via HTTP I'm setting dlr-mask=31 >>>>>> >>>>> >>>>>> >>>>> I'm getting DLR correctly but only with status = 8 (delivered to >>>>>> smsc). >>>>>> >>>>> When I get the sms on my mobile phone, there's nothing being >>>>>> received by >>>>>> >>>>> kannel, so my guessing is that I'm setting dlr-mask with a value that >>>>>> >>>>> doesn't ask my mobile operator to get a DLR for the sent message. Or am >>>>>> >>>>> I wrong? >>>>>> >>>>> Can someone explain which are valid values for dlr-mask if I want to >>>>>> >>>>> request for full DLR to the operator? >>>>>> >>>>> (I'm sure my operator supports DLR, because when sending from the phone >>>>>> >>>>> with this option enabled, I get a DLR when it gets delivered on the >>>>>> >>>>> destination's mobile) >>>>>> >>>>> >>>>>> >>>>> Thanks in advance for your time. >>>>>> >>>>> >>>>>> >>>>> Regards, >>>>>> >>>>> >>>>>> >>>>> Alejandro >>>>>> >>>>> >>> >> >> > >