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: [email protected] [mailto:[email protected]] On Behalf
Of Michael van der Poel
Sent: Tuesday, 12 July, 2011 22:00
To: Alejandro Mejia Evertsz
Cc: [email protected]
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%2
5status%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" <[email protected]> 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
<http://x.x.x.x:8080/cgi-bin/sendsms?username=mysuername&password=mypassword
&to> &password=mypassword&to
>
=mymobile&text=Hello+world&dlr-mask=31&dlr-url=http://y.y.y.y/dlr.cgi?id=mys
ms
> 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
<http://y.y.y.y/dlr.cgi?id=mysmsID&status=%25d> &status=%d
> 
> 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"<[email protected]>  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
<http://yourserver.com/dlr.php?smscID=%25i&dlr=%25d&answer=%25A&to=%25p&from
=%25P&ts=%25%3e%3e%3e%3e> &dlr=%d&answer=%A&to=%p&from=%P&ts=%>>>> 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"<[email protected]>   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
>>>>> 
>> 
> 

Reply via email to