> 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 As I've read in the Kannel lists, the only official parameter is %d. But, nothing stops you to experiment with other parameters, although nobody guarantees these will be available in the next release of Kannel. I experimented with all one-letter parameters, constructing the dlr-url like this: http://www.xyz.com/cgi/dlr.php??type=%d&id=$id&gsm=$to&q=%q&w=%w&e=%e&r=%r&t=%t&y=%y&u=%u&i=%i&o=%o&p=%p&a=%a&s=%s&d=%d&f=%f&g=%g&h=%h&j=%j&k=%k&l=%l&z=%z&x=%x&c=%c&v=%v&b=%b&n=%n&m=%m&Q=%Q&W=%W&E=%E&R=%R&T=%T&Y=%Y&U=%U&I=%I&O=%O&P=%P&A=%A&S=%S&D=%D&F=%F&G=%G&H=%H&J=%J&K=%K&L=%L&Z=%Z&X=%X&C=%C&V=%V&B=%B&N=%N&M=%M Then, in dlr.php, I logged all GET parameters, and some contained real data: q: +401234567890 w: %w e: %e r: sub:000 dlvrd:000 submit date:0406120539 done date:0407120541 stat:UNDELIV err:999 text:route 3 t: 2004-07-12 15:10:17 y: %y u: i: al o: %o p: +306979252516 a: id:0900020671 sub:000 dlvrd:000 submit date:0406120539 done date:0407120541 stat:UNDELIV err:999 text:route 3 s: sub:000 d: 2 f: %f g: %g h: %h j: %j k: id:0900020671 l: %l z: %z x: %x c: -1 v: %v b: id:0900020671 sub:000 dlvrd:000 submit date:0406120539 done date:0407120541 stat:UNDELIV err:999 text:route 3 n: kaal m: %m Q: 13033 W: %W E: %E R: %R T: 1089645017 Y: %Y U: %U I: 6378fa26-d650-4e2b-b8d1-030e7f5f4c62 ... etc. Test with your messages, see what parameters you get, and what you can use. Good luck! Robert > 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.
