2014-04-29 10:11 GMT+04:00 Saurabh Pandey <sam.it.develo...@gmail.com>:
> > Now, I've changed stuff and now SMS ID field contains ID and dlr_url > contains actual URL (this URL does some tasks on my app). The problem is > 1) When I get DLR, the SMS ID changes > 2) Now a match is performed based on this new SMS ID, obviously, it > couldn't find the corresponding entry in dlr-table, so no DLR is sent to > the client. > This question has been raised many times. sms->id is an internal message UID used by kannel in its internal purposes to track messages. You should use your own msgid (add a field for example with it) or use msgid as part of dlr_url (better way), because only dlr_url saved (+ info about actual DLR status) when you receive DLR from your upstream SMSC provider. Using sms.foreign_id is not recommended because it may clash for some reason with other connected SMSC providers foreign ids. > > On Mon, Apr 28, 2014 at 11:55 PM, Porter, Kelvin > <kelvin.por...@h3net.com>wrote: > >> Hi, >> >> >> >> It appears that sms.id is a uuid instance, and has to be parsed (via >> uuid_unparse). >> >> >> >> You might also check the source for where the id is displayed. >> >> >> Regards, >> >> >> >> Kelvin R. Porter >> >> >> >> *From:* users [mailto:users-boun...@kannel.org] *On Behalf Of *Saurabh >> Pandey >> *Sent:* Monday, April 28, 2014 12:00 PM >> *To:* users@kannel.org >> *Subject:* Re: OpenSMPPBox :: SMS ID issue >> >> >> >> I would really appreciate any help here. This small fix will fix my whole >> system. Thanks in advance >> >> >> >> On Mon, Apr 28, 2014 at 9:08 PM, Saurabh Pandey < >> sam.it.develo...@gmail.com> wrote: >> >> Hi everyone, >> >> I have the following setup: >> >> SMSC<----> bearerbox <---->Sqlbox <----Opensmppbox<-----> smpp client >> >> Now I have done some changes in source of OpenSMppbox and there is one >> issue that I can't seem to understand. >> >> DLRs are checked using msg ID. Now I am trying to fetch msg id from msg >> object but I am getting garbage value. The weird part is that when I dump >> the msg object I am getting the msg id in there. How do i fetch it am I >> making some logical mistake? >> >> Here is the code I've written: >> >> opensmppbox: line 725 >> >> info(0, "received msg dumping manually by sam"); >> msg_dump(msg, 0); >> info(0, "msg id: %S",msg->sms.id); >> >> The output I'm getting in the logs is: >> >> >> -------------------------------------------------------------------------------------------------------------- >> 2014-04-28 11:43:58 [27013] [9] INFO: received msg dumping manually by sam >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Msg object at 0x7f25d80039e0: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: type: sms >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.sender: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string at 0x7f25d8003b60: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: len: 8 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: size: 9 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: immutable: 0 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 54 45 53 54 20 53 4d >> 53 TEST SMS >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string dump ends. >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.receiver: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string at 0x7f25d8003b90: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: len: 10 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: size: 11 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: immutable: 0 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 39 30 30 31 38 35 33 33 >> 39 39 *90018XXXXX* >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string dump ends. >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.udhdata: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.msgdata: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string at 0x7f25d8003db0: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: len: 112 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: size: 113 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: immutable: 0 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 69 64 3a 35 39 31 30 37 >> 31 33 39 38 36 39 36 32 id:5910713986962 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 33 38 36 37 35 32 32 20 >> 73 75 62 3a 30 30 31 20 3867522 sub:001 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 64 6c 76 72 64 3a 30 30 >> 30 20 73 75 62 6d 69 74 dlvrd:000 submit >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 20 64 61 74 65 3a 31 34 >> 30 34 32 38 32 30 31 33 date:1404282013 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 20 64 6f 6e 65 20 64 61 >> 74 65 3a 31 34 30 34 32 done date:14042 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 38 32 30 31 33 20 73 74 >> 61 74 3a 55 4e 44 45 4c 82013 stat:UNDEL >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 49 56 20 65 72 72 3a 30 >> 30 35 20 74 65 78 74 3a IV err:005 text: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string dump ends. >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.time: 1398696238 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.smsc_id: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string at 0x7f25d8003560: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: len: 8 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: size: 9 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: immutable: 0 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 6d 76 2d 70 72 6f 6d >> 6f mv-promo >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string dump ends. >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.smsc_number: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.foreign_id: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string at 0x7f25d8004200: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: len: 20 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: size: 21 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: immutable: 0 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 35 39 31 30 37 31 33 39 >> 38 36 39 36 32 33 38 36 5910713986962386 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 37 35 32 >> 32 7522 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string dump ends. >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.service: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string at 0x7f25d8004230: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: len: 8 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: size: 9 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: immutable: 0 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 74 65 73 74 73 6d 70 >> 70 testsmpp >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string dump ends. >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.account: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string at 0x7f25d8004280: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: len: 5 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: size: 6 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: immutable: 0 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 72 61 68 75 >> 6c rahul >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string dump ends. >> *2014-04-28 11:43:58 [27013] [9] DEBUG: sms.id <http://sms.id>: >> d47d96d8-c80b-42b1-bab8-1b2cbeddce43* >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.sms_type: 3 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.mclass: -1 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.mwi: -1 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.coding: 0 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.compress: -1 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.validity: -1 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.deferred: -1 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.dlr_mask: 2 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.dlr_url: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string at 0x7f25d80042d0: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: len: 85 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: size: 86 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: immutable: 0 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 68 74 74 70 3a 2f 2f 32 >> 30 30 2e 31 37 34 2e 31 http://xxx.xxx.x >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 33 31 2e 35 33 2f 61 70 >> 70 2f 66 65 74 63 68 44 xx.xx/soft/urlD >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 4c 52 2f 69 6e 64 65 78 >> 2e 70 68 70 3f 6d 6f 62 LR/index.php?mob >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 69 6c 65 3d 25 70 26 64 >> 6c 72 3d 25 64 26 76 65 ile=%p&dlr=%d&ve >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 6e 64 6f 72 5f 64 6c 72 >> 3d 25 41 26 76 6d 73 67 ndor_dlr=%A&vmsg >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 69 64 3d 25 >> 46 id=%F >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string dump ends. >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.pid: -1 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.alt_dcs: -1 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.rpi: -1 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.charset: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.boxc_id: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string at 0x7f25d8004300: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: len: 8 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: size: 9 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: immutable: 0 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 74 65 73 74 73 6d 70 >> 70 testsmpp >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string dump ends. >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.binfo: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.msg_left: -1 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.split_parts: (nil) >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.priority: -1 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.resend_try: -1 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.resend_time: -1 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: sms.meta_data: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string at 0x7f25d80043b0: >> 2014-04-28 11:43:58 [27013] [9] DEBUG: len: 18 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: size: 19 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: immutable: 0 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 3f 73 6d 70 70 3f 64 6c >> 72 5f 65 72 72 3d 30 30 ?smpp?dlr_err=00 >> 2014-04-28 11:43:58 [27013] [9] DEBUG: data: 35 >> 26 5& >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Octet string dump ends. >> 2014-04-28 11:43:58 [27013] [9] DEBUG: Msg object ends. >> *2014-04-28 11:43:58 [27013] [9] INFO: msg id: ???tjsh^[Cde'* >> >> >> ---------------------------------------------------------------------------------------------------- >> >> >> >> Why am I getting the garbage value? Also, when I try to fetch >> *sms.foreign_id, >> *I got error at the time of *make *(compile time) that no member found >> foreign_id for msg. What am I doing wrong? Please help. >> >> Thanks in advance. >> >> -Sam >> >> >> > >