Fwd: Re: DLR
Hello Alejandro! Thank for your reply. dlr - are you meaning BIND_RECEIVER and BIND_RECEIVER_RESP? They told me that they use only transceiver mode. If dlrs are disabled on SMSC, I wouldn't receive nothing. And I'm not shure that I recieve first dlr from SMSC. All time when is started dlr-url by kannel, means that SMSC responded? When I saw logs, i paid attention on Sent SMS ...[flags:-1:0:-1:-1:*31*]... Receive DLR ...[flags:-1:-1:-1:-1:*8*]... When an SMS is sent, fifth falg (dlr_mask) goes like 31, and it's correct But receiver have this flag set at 8. In this way we get the status? on second request dlr_mask is set to 8. Maybe this is the problem that I recieve only one time? What do you think guys, the problem is clear and it goes only from SMSC? or maybe problem it's in Kannel? I understand last log message (2013-08-08 14:07:29 [11003] [9] DEBUG: boxc_receiver: heartbeat with load value 0 received) like SMSC returned nothig. Or im wrong? On 08.08.2013 14:58, Alejandro Guerrieri wrote: The smsc must have dlrs enabled on their side as well, contact them and ask if it's enabled. Hope it helps, -- Alex Guerrieri On Aug 8, 2013, at 7:42, Dorin Aftenii dorinafte...@mail.ru mailto:dorinafte...@mail.ru wrote: Hello, please please please help me! I have a problem that I can't solve. I use Bearerbox - SMSbox - SQLBox All works fine except DLR. I can't recieve delivery status. Wen I send an SMS, kannel start php script from dlr-url only one time and return status 8 (smsc submit), after that no more responses. But I expect from him other statuses: error, success. etc. I will be grateful for any help. Next I give some server configguration files and logs: my logs: 2013-08-08 14:07:22 Sent SMS [SMSC:craftmobile] [SVC:] [ACT:] [BINF:] [FID:2518700643] [META:] [from:89021104107] [to:79257405404] [flags:-1:0:-1:-1:31] [msg:15:??$ 2013-08-08 14:07:22 Receive DLR [SMSC:craftmobile] [SVC:] [ACT:] [BINF:] [FID:2518700643] [META:] [from:89021104107] [to:79257405404] [flags:-1:-1:-1:-1:8] [msg:4:ACK/$ 2013-08-08 14:07:22 [11003] [11] DEBUG: boxc_receiver: sms received 2013-08-08 14:07:22 [11003] [11] DEBUG: send_msg: sending msg to boxc: mysqlbox 2013-08-08 14:07:22 [11003] [10] DEBUG: send_msg: sending msg to boxc: mysmsbox 2013-08-08 14:07:22 [11003] [10] DEBUG: boxc_sender: sent message to 127.0.0.1 2013-08-08 14:07:22 [11003] [9] DEBUG: boxc_receiver: got ack 2013-08-08 14:07:29 [11003] [9] DEBUG: boxc_receiver: heartbeat with load value 0 received 2013-08-08 14:07:36 [11003] [8] DEBUG: Dumping 0 messages to store 2013-08-08 15:03:26 [11003] [7] DEBUG: clear_old_concat_parts called Look at my configuration files kannel.conf and sqlbox.conf: #KANNEL CONFIG FILE group = core admin-port = 13000 admin-password = ** smsbox-port = 13001 log-file = /var/log/kannel/kannel.log log-level = 0 access-log = /var/log/kannel/access_kannel.log store-file = /var/log/kannel/store_sms dlr-storage = mysql group = smsc smsc = smpp smsc-id = craftmobile host = 89.249.18.53 port = 27703 smsc-username = ** smsc-password = ** system-type = VMA log-file = /var/log/kannel/smpp-smsc.log log-level = 1 dest-addr-ton = 1 dest-addr-npi = 1 #alt-charset = UCS-2 group = smsbox bearerbox-host = localhost smsbox-id = mysmsbox sendsms-port = 13013 log-file = /var/log/kannel/smsbox.log log-level = 0 group = smsbox-route smsbox-id = mysmsbox smsc-id = craftmobile #shortcode = 2288 group = sendsms-user dlr-url = http://134.0.113.138/dlr.php?type=%d; http://134.0.113.138/dlr.php?type=%d concatenation = true max-messages = 5 username = password = ** default-smsc = SMSC group = dlr-db id = mydlr table = oempro_kannel_dlr field-smsc = smsc field-timestamp = ts field-destination = destination field-source = source field-service = service field-url = url field-mask = mask field-status = status field-boxc-id = boxc group = mysql-connection id = mydlr host = localhost username = password = ** database = sender max-connections = 1 # -- SQLBOX GROUP -- group = sqlbox id = sqlbox-db smsbox-id = mysqlbox bearerbox-port = 13001 smsbox-port = 13003 smsbox-port-ssl = false sql-log-table = oempro_kannel_sqlbox_sent_sms sql-insert-table = oempro_kannel_sqlbox_send_sms log-file = /var/log/kannel/sqlbox.log log-level = 3 group = mysql-connection id = sqlbox-db host = localhost username = password = ** database = sender max-connections = 1 query that I use for sending an SMS: INSERT INTO oempro_kannel_sqlbox_send_sms ( momt, sender, receiver, msgdata, sms_type, dlr_mask, dlr_url, boxc_id ) VALUES ( 'MT', '8902110', '7925740', 'Test message', 2, 31, 'http://134.0.113.138/dlr.php?smsc=%ifrom=%Pto=%pdlr-mask=%dsmsID=123456789', 'mysmsbox' ); Thanks! Dorin.
[Fwd: Re: DLR-URL and parameters confusion]
Sorry, forget to cc list Forwarded Message From: Alvaro Cornejo cornejo.alv...@gmail.com To: Elton Hoxha elt...@gmail.com Subject: Re: DLR-URL and parameters confusion Date: Thu, 05 Mar 2009 11:38:27 -0500 Hi It can be just as simple as: dlr-url =http://10.1.21.236:2469/KannelGetStatus.asmx/GetStatus?dlrv=% dmyid= or add any additional info you might need. This might be your full call to kannel. Note you will better urlencode() the full dlr-url (as well as message text) prior to post it to kannel to avoid issues with some chars: http://localhost:13004/cgi-bin/sendsms?username=remindmepassword=alertsto=4043078165text=testdlr-mask=31drl-url='http://10.1.21.236:2469/KannelGetStatus.asmx/GetStatus?dlrv=%dmyid=' So, for each MT you send to kannel you need to change the value of myid Finally take a look at dlr-mask value in order to get only the statuses you are interested in. (31 = All statuses) And that's it Regards Alvaro On Thu, 2009-03-05 at 17:01 +0100, Elton Hoxha wrote: Thanks for your reply. I think that %i parameter is useful when we deal with multiple smpp connections, making possible to defer the shortcodes from eachother. The scenario that i`m interested is like this: My application submits an MT message to Kannel adding that extra generated ID (let`s say , to keep track of that sms) to the URL, Kannel forwards it to SMSC and SMSC returns absent subscriber (phone switched off) Nak. Then kannel returns the value 8 or 4 (I guess so, just being submitted to SMSC waiting in the queue). Now, whenever the subscriber switches on the phone and the sms get delivered, SMSC will send an ack to kannel, and I want KAnnel at that moment to send back to me the message status (i guess it will send 1) and that generated ID . As all parameters are predefined in kannel, please can you tell me how to put the correct parameter for myid. dlr-url =http://10.1.21.236:2469/KannelGetStatus.asmx/GetStatus?dlrv= %dstatus=%Fmyid=? Many thanks On Thu, Mar 5, 2009 at 4:42 PM, Alvaro Cornejo cornejo.alv...@gmail.com wrote: Hi If you are refering to the message unique identifier, you must generate it and feed it into the dlr-url. You can feed any info you like to dlr-ulr. Kannel will honour that url and will only replace the values he know about (%P,%a, %q, etc) the rest of url will be send back exactly as you sent it to kannel. Then when kannel has an dlr to feed you back to your application, kannel will sent the info provided by the dlr-url and your script will handle it as you wish... or simply does nothing if don't need dlr but use a fake script just to make kannel feel good ;D Note that depending on your needs, that unique id might not be necessary. Dlr is used to track message status -either for billing/stats/other- and you can get different parameters for having the detailed info, again if needed. However, if you are refering to smsc id (the identification of the route) it is %i and it will be the id you set on your smcs config. Regards Alvaro On Thu, 2009-03-05 at 16:21 +0100, Elton Hoxha wrote: Hi Alvaro, I was checking the mail list and I am reading your communication with other guy regarding dlr-url. Refering to: --- On Tue, 1/13/09, Alvaro Cornejo cornejo.alv...@gmail.com wrote: From: Alvaro Cornejo cornejo.alv...@gmail.com Subject: Re: dlr-url To: Drew Stockler psustock1...@yahoo.com Cc: users@kannel.org 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
[Fwd: Re: DLR-URL and parameters confusion]
this one too forget to cc list Forwarded Message From: Alvaro Cornejo cornejo.alv...@gmail.com To: Elton Hoxha elt...@gmail.com Subject: Re: DLR-URL and parameters confusion Date: Thu, 05 Mar 2009 10:42:57 -0500 Hi If you are refering to the message unique identifier, you must generate it and feed it into the dlr-url. You can feed any info you like to dlr-ulr. Kannel will honour that url and will only replace the values he know about (%P,%a, %q, etc) the rest of url will be send back exactly as you sent it to kannel. Then when kannel has an dlr to feed you back to your application, kannel will sent the info provided by the dlr-url and your script will handle it as you wish... or simply does nothing if don't need dlr but use a fake script just to make kannel feel good ;D Note that depending on your needs, that unique id might not be necessary. Dlr is used to track message status -either for billing/stats/other- and you can get different parameters for having the detailed info, again if needed. However, if you are refering to smsc id (the identification of the route) it is %i and it will be the id you set on your smcs config. Regards Alvaro On Thu, 2009-03-05 at 16:21 +0100, Elton Hoxha wrote: Hi Alvaro, I was checking the mail list and I am reading your communication with other guy regarding dlr-url. Refering to: --- On Tue, 1/13/09, Alvaro Cornejo cornejo.alv...@gmail.com wrote: From: Alvaro Cornejo cornejo.alv...@gmail.com Subject: Re: dlr-url To: Drew Stockler psustock1...@yahoo.com Cc: users@kannel.org 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=remindmepassword=alertsto=4043078165text=testdlr-mask=31drl-url='http://localhost/sms.php?phone=%psmsid=[YourOwnId]timestamp=%Tdlrv=%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 I would like to ask, while setting this unique ID from application side, how can I represent it in the sendsms-user block? So dlr-url = http://10.1.21.236:2469/KannelGetStatus.asmx/GetStatus?dlrv=% dstatus=%Fsmsid=? Table 6.9 has all the parameters that we can use, how can I add the escape code here for the smsid?? Thanks Elton
[Fwd: Re: DLR DB processing]
---BeginMessage--- :) every sql db has its advantages. I use PostgreSQL in a view its stability and features I cant find in MySQL or Oracle ... In short rules on insert/update and MO service descriptions stored in the db make my life easier. We simply avoid http requests because we handle the MO on insert ... :) And we have implemented the MT charging of value added services very easily. I am quite sure there are similar or even better implementations of MySQL , Oracle or MS SQL. RE: setting sqlbox to handle all the traffic, its good idea to contact the current sqlbox maintainer, there were a lot of improvements these days. I use old patched version of the sqlbox. In short, you set the sqlbox to listen to the bearerbox, and the smsbox to listen to the sqlbox port instead to the bearerbox .. :) the following scheme is not full but i hope you will get the idea .. SMSC-bearerbox:port-sqlbox:port-smsbox-http:sendsmsport:bearerbox-SMSC cheers Nikos Balkanas wrote: Hi Seikath, Postgress might be a bit on the heavy side for plain DLR storage. I tend to agree with you about SQLbox being a better choice for DLRs. Thanx for the input, Nikos - Original Message - From: seikath seik...@gmail.com To: Nikos Balkanas nbalka...@gmail.com Cc: users@kannel.org Sent: Thursday, January 15, 2009 11:03 PM Subject: Re: DLR DB processing sql and postgresql and rules on insert /its pgsql only feature/ set the sqlbox to handle MT and DLR and set the postgresql to allow like 2000 concurrent connections - you need some RAM for that ... Nikos Balkanas wrote: Hi, I am considering using a DB for DLR storage. Up till now I was using internal DLRs. Of the many options supported, (Mysql, PostgresSQL, Oracle, LibSdb, sqlbox, sqllite) which one would you consider best suited for bulk SMS, in terms of performance and reliability. If you could also give a one liner for your choice, it would be most appreciated. I thing it is fair to say, that internal is the fastest and least reliable of all. Thanx Nikos ---End Message---