Re: [Kannel-Users] Anyone solved how to extract more than %d using the dlr-url?

Peter Beckman <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
You can make the dlr-url anything you want:

    http://xyz.com/dlr.php?smsid=345&type=%d&smsc=%i

You can set the smsid to whatever you want.  That's what I do to keep track
of the messages -- insert into an smslog SQL table, then set the DLR for
that message (before sending obviously) to the primary key of that table as
the smsid.

Make sense?

Beckman

On Sat, 24 Jul 2004, Hillel Bilman wrote:

> Dear Kannel friends,
>
> 1)How do your receive back in the dlr-url the information found in the
> access.log [msg:%L:%b] about the dlr
>
> According to the user guide: "If you set the dlr-mask=7 and
> dlr-url=http://www.xyz.com/cgi/dlr.php?type=%d"
> You only get the %d back so how do you get back the full msg part as seen in
> the access.log i.e. [msg:107:id:0039677088
> sub:001 dlvrd:001 submit date:040713233645 done date:040713233720
> stat:DELIVRD err:000 Text: ] especially the code after the err: parameter.
> In this case it's 000
>
> I've got a requirement to extract the error codes for each SMS sent to
> enable me to find out the reason
> the SMS was not delivered so I'd need to extract from the DLR the error code
> part after the err: parameter.
> The SMSC provider will give me the reason the SMS was not delivered based on
> the error code.
> Then I would place this information in a mysql database corresponding to
> that SMS based on the msgid.
>
> Any idea how to do this as from the documentation the access log format is:
> "access-log-format string String defining a custom log file line format.
> May use escape codes as defined later on to substitute values of the
> messages into the log entry.
> If no custom log format is used the standard format will be: "%t %l
> [SMSC:%i] [SVC:%n] [ACT:%A] [BINF:%B] [from:%p] [to:%P]
> [flags:%m:%c:%M:%C:%d] [msg:%L:%b] [udh:%U:%u]"
>
> How can you extract from [msg:%L:%b] %L and %b using the dlr-url or any
> other means.
> If I have to, I can change the kannel code and submit it, only which c file
> pulls out the information %d to use in the dlr-url and maybe I can also pull
> out the %L and %b as well.
>
> 2)A further related question is the codes used in the access.log are not all
> defined in the table Table 6-9. Parameters (Escape Codes) so what these
> mean?
> %l
> %m
> %M
> %L
> %U
>
> Eg access.log
> 2004-07-14 19:41:29 Sent SMS [SMSC:mob] [SVC:tester] [ACT:] [BINF:]
> [from:Bos] [to:27824496273] [flags:-1:0:-1:-1:7] [msg:5:test3] [udh:0:]
> 2004-07-14 20:47:33 DLR SMS [SMSC:mob] [SVC:tester] [ACT:] [BINF:]
> [from:Bos] [to:27824496273] [flags:-1:-1:-1:-1:1] [msg:107:id:0039719965
> sub:001 dlvrd:001 submit date:040714194238 done date:040714194322
> stat:DELIVRD err:000 Text: ] [udh:0:]
>
> Thanks any help appreciated.
>
>

---------------------------------------------------------------------------
Peter Beckman                                                  Internet Guy
[email protected]                             http://www.purplecow.com/
---------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.