Hi Drew

In order to capture the message you sent you might do like this:

1) Generate/get/capture the message to be sent.
2) Insert msg to a DB -with all additional information you want ie
SourceNum, DestinationNum, Msg, InsertTimeStamp, dlrTimeStamp, MsgId,
SenderAccount, BillingInfo, etc- and get the ID of the stored message.
Else you can autogenerate the id yourself. Somewhere in the net you can
a howto to generate unique numbers.
3) Send the message to kannel. In the dlr-url put the message Id got in
step 2
4) Once kannel get any update to the message status, it will call your
sms.php script. sms.php will be in charge to look into the database and
update accordingly (like described in previous mail).
5) You can query your DB any moment to see message status evolution and
any other information you stored there.

Regards

Alvaro


On Tue, 2009-01-13 at 18:05 -0800, Drew Stockler wrote:
> Thank you it does.
> 
> If text= doesnt capture the message I send through the http request.
> How do i capture that. In the case below, I want to store test instead
> of ACK/ .
> In addition who do I get a dlr value of 1 for message delivered? Does
> that have to do with the update you talked about below?
> 
> Thanks,
> Drew
> 
> --- On Tue, 1/13/09, Alvaro Cornejo <[email protected]> wrote:
>         From: Alvaro Cornejo <[email protected]>
>         Subject: Re: dlr-url
>         To: "Drew Stockler" <[email protected]>
>         Cc: [email protected]
>         Date: Tuesday, January 13, 2009, 6:27 PM
>         
>         Hi Drew
>         
>         The status of your message is dlrv=8 that means message delivered to
>         your smsc. Check docs for the other status
>          values.
>         
>         I'm not sure but I think that %a and %A is "ACK%2F" because it is
>         the
>         "sms text part" of the dlr message. In this case, the text received
>         is
>         the "ACK" from bearerbox when submitting the message to your smsc. 
>         
>         I think you don't need this info to match your dlr, I'll add intead an
>         ID from your own in the dlr-url so you can use it to match dlr with 
> your
>         database and update the appropiate reccord accordingly to the dlr.
>         
>         you can use something like:
>         
>         
> http://localhost:13004/cgi-bin/sendsms?username=remindme&password=alerts&to=4043078165&text=test&dlr-mask=31&drl-url='http://localhost/sms.php?phone=%p&smsid=[YourOwnId]&timestamp=%T&dlrv=%d'
>         
>         and have your sms.php script look at the db for the smsid value and
>         update the status field accordingly. Something like:
>         
>               UPDATE table SET dlrv = $dlrv, timestamp=$timestamp WHERE 
> msg_id =
>         $smsid AND from_number =
>          $phone
>         
>         
>         Hope helps
>         
>         
>         
>         On Tue, 2009-01-13 at 15:42 -0800, Drew Stockler wrote:
>         > I go the script to save the information to the database. However for
>         > text message and deliver report response i get ACK/ inserted into 
> the
>         > database. Here is the call line:
>         > 
>         >
>         
> http://localhost:13004/cgi-bin/sendsms?username=remindme&password=alerts&to=4043078165&text=test&dlr-mask=31&drl-url='http://localhost/sms.php?phone=%p&text=%a&timestamp=%T&dlrv=%d&dlrr=%A'
>         > 
>         > here is the log file from the smsbox:
>         > 
>         >  INFO: sendsms sender:<remindme:3124010078> (127.0.0.1)
>         > to:<4043078165> msg:<test>
>         > 2009-01-13 17:06:39 [12806] [3] DEBUG: Stored UUID
>         > 1de08490-9f07-4f38-926f-700e9c96e0f8
>         > 2009-01-13 17:06:39 [12806] [3] DEBUG: message length 4, sending 1
>         > messages
>         > 2009-01-13 17:06:39 [12806] [3] DEBUG:
>          Status: 202 Answer: <Sent.>
>         > 2009-01-13 17:06:39 [12806] [3] DEBUG: Delayed reply - wait for
>         > bearerbox
>         > 2009-01-13 17:06:39 [12806] [0] DEBUG: Got ACK (0) of
>         > 1de08490-9f07-4f38-926f-700e9c96e0f8
>         > 2009-01-13 17:06:39 [12806] [0] DEBUG: HTTP: Resetting HTTPClient 
> for
>         > `127.0.0.1'.
>         > 2009-01-13 17:06:43 [12806] [4] INFO: Starting delivery report
>         > <remindme> from <3124010078>
>         > 2009-01-13 17:06:43 [12806] [9] DEBUG: Parsing URL
>         > `http://localhost/sms.php?phone=4043078165&text=ACK%
>         > 2F&timestamp=1231888003&dlrv=8&dlrr=ACK%2F':
>         > 2009-01-13 17:06:43 [12806] [9] DEBUG:   Scheme: http://
>         > 2009-01-13 17:06:43 [12806] [9] DEBUG:   Host: localhost
>         > 2009-01-13 17:06:43 [12806] [9] DEBUG:   Port: 80
>         > 2009-01-13 17:06:43 [12806] [9] DEBUG:   Username: (null)
>         > 2009-01-13 17:06:43 [12806] [9] DEBUG:   Password: (null)
>         >
>          2009-01-13 17:06:43 [12806] [9] DEBUG:   Path: /sms.php
>         > 2009-01-13 17:06:43 [12806] [9] DEBUG:   Query:
>         >
>         phone=4043078165&text=ACK%2F&timestamp=1231888003&dlrv=8&dlrr=ACK%2F
>         > 
>         > --- On Mon, 1/12/09, Alvaro Cornejo <[email protected]>
>         wrote:
>         >         From: Alvaro Cornejo <[email protected]>
>         >         Subject: Re: dlr-url
>         >         To: "Drew Stockler" <[email protected]>
>         >         Cc: [email protected]
>         >         Date: Monday, January 12, 2009, 7:32 PM
>         >         
>         >         Hi Drew
>         >         
>         >         Sure you can, but that shall be handled by the script. 
> Kannel will
>         >         provide you with the variable values.
>         >         
>         >         Regards
>         >         
>         >         Alvaro
>         >         
>         >         
>         >         
>         >       
>          
>         
> |-----------------------------------------------------------------------------------------------------------------|
>         >         Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde
>         cualquier
>         >         celular y Nextel
>         >         en el Perú, México y en mas de 180 paises. Use aplicaciones 
> 2
>         vias via
>         >         SMS y GPRS
>         >          online
>         >                       Visitenos en www.perusms.NET 
> www.smsglobal.com.mx y
>         >         www.pravcom.com
>         >         
>         >         
>         >         
>         >         On Mon, Jan 12, 2009 at 6:55 PM, Drew Stockler
>         <[email protected]>
>         >         wrote:
>         >         > Can i have the script insert the variable information 
> into a
>         database?
>         >         >
>         >         > Thanks,
>         >         > Drew
>         >         >
>         >         > --- On Mon, 1/12/09, Alvaro Cornejo
>         <[email protected]>
>         >   
>               wrote:
>         >         >
>         >         > From: Alvaro Cornejo <[email protected]>
>         >         > Subject: Re: dlr-url
>         >         > To: "Drew Stockler" <[email protected]>
>         >         > Cc: [email protected]
>         >         > Date: Monday, January 12, 2009, 4:35 PM
>         >         >
>         >         >
>         >         >
>         >         >
>         > 
>         
> 


Reply via email to