**>From: "Willy Mularto" <[EMAIL PROTECTED]>
**>To: <[email protected]>
**>Subject: dlr-url and dlr-mask
**>Date: Thu, 30 Dec 2004 10:22:38 +0700
**>
**>Guys I have read about dlr-url and dlr-mask on the user guide, what I don't 
**>understand is on dlr-url said that a  URL to be fetched if a dlr-mask CGI 
**>parameter is present. and dlr-mask is  Optional. Request for delivery 
**>reports with the state of the sent message. The value is a bit mask 
**>composed of: 1: Delivered to phone, 2: Non-Delivered to Phone, 4: Queued on 
**>SMSC, 8: Delivered to SMSC, 16: Non-Delivered to SMSC. Must set dlr-url on 
**>sendsms-user group or use the dlr-url CGI variable.
**>
**>I have set dlr-url under sendsms-user group to http://192.168.1.68/, how to 
**>activated the dlr-mask with http://192.168.1.68:1234/cgi-bin/sendsms ? and 
**>view the dlr status? Thank you for any reply.
**>
**>
**>Regards
**>
**>Willy 

What you might want to do is make a dlr-url more "verbose" when
reporting back to your application that a DLR has come in which
you are interested in.

Here's my suggestion:
  1) Setup an HTTP server that supports cgi-bin (or whatever server-side
     execution system you want) on 192.168.1.68
  2) Create an application that will accept the information from the 
     HTTP_GET that will be sent by the smsbox as defined by the dlr-url
     specified by you (http://192.168.1.68/cgi-bin/record-dlr).
  3) In your "group = sendsms-user" section, set up a "dlr-url" config like:
       dlr-url = 
"http://192.168.1.68/cgi-bin/record-dlr?oa=%p&amp;da=%P&amp;smsc=%i&amp;dlr-type=%d";
     With the above dlr-url, the smsbox will provide the record-dlr
     application with much more information (origination address,
     destination address, smsc used, DLR type).
  4) Determine which reports you are interested in and create a
     DLR-Mask for it by or'ing up all the values of the DLR reports you
     want.  For example, I want {1}-Delivered to phone, {2}-Non-Delivered
     to phone, and {16}-Non-Deliverable to SMSC. Therefore, my DLR-Mask
     would be: 1|2|16 = 19
  5) When sending the MT SMS, add the parameter dlr-mask=19... to your
     HTTP_GET like this:
       GET /cgi-bin/sendsms?from=...&to=...&dlr-mask=19&text=....
     Or, if you are using HTTP_POST, the DLR-Mask will be in the
     X-Kannel-DLR-Mask HTTP header:
       X-Kannel-DLR-Mask: 19
     Or, if you are using HTTP_POST with an XML document, the
     XML document should have a <dlr-mask>19</dlr-mask> node in it.
  6) When the smsbox receives a DLR you are interested in, it will
     make an HTTP_GET to the URL defined in your dlr-url:
  7) The "record-dlr" application on 192.168.1.68 will receive
     the information from the HTTP_GET as follows:
       Arg1 -> "oa=xxx" where xxx is the phone number of the person
               sending you this DLR (usually the person targeted by the
               MT SMS you sent to him/her).
       Arg2 -> "da=yyy" where yyy is the phone number you are using
               when sending out the MT SMS.
       Arg3 -> "smsc=zzz" where zzz is the SMSC used when you sent
               the MT SMS.
       Arg4 -> "dlr-type=###" where ### is the decimal number representing
               the type of DLR being reported back to you (1 if it was
               successfully delivered to the end user, 16 if the SMSC
               rejected the request to send the MT SMS, etc).
  8) Since your "record-dlr" application has the information about
     the status of delivery of your MT SMS, your "record-dlr" can
     massage the information to generate whatever report format your
     want (or store it in a database for someone else to deal with
     it).

See ya...

d.c.

Reply via email to