Hi Alvaro, I am currently using dlr-url but i do not see a parameter that brings the command_status. The %d is not what i am looking for, it only give me the info that the message has been delivered or not. (i only get value 16 for failed delivery using mask 31)
The command_status i can only get from bearerbox.log and is essential for me to get this info in my app because the operator set in this field the different status of the message (failed because is not subscribed, failed because do not have enough money, etc). 2015-10-16 17:56:57 [30883] [6] DEBUG: SMPP PDU 0x7f1228008810 dump: 2015-10-16 17:56:57 [30883] [6] DEBUG: type_name: submit_sm_resp 2015-10-16 17:56:57 [30883] [6] DEBUG: command_id: 2147483652 = 0x80000004 2015-10-16 17:56:57 [30883] [6] DEBUG: command_status: 1018 = 0x000003fa 2015-10-16 17:56:57 [30883] [6] DEBUG: sequence_number: 4217 = 0x00001079 2015-10-16 17:56:57 [30883] [6] DEBUG: message_id: "1b00ba52" 2015-10-16 17:56:57 [30883] [6] DEBUG: SMPP PDU dump ends Thanks for the help On Fri, Oct 16, 2015 at 12:17 PM, Alvaro Cornejo <cornejo.alv...@gmail.com> wrote: > Hi > > Check manual about parameters you can receive within the dlr. (Table 7-10 > parameters escape codes) > > On top of those, you need to have, into the dlr-url, something you can use > to identify the original message and linked it to a record within your db. > Something like: > > $dlr-url=urlencode(http://myhost/mypath/mydlrscript.php?myid=12345& > <http://myhost/mypath/mydlrscript.php?myid=12345)&.>from=%p&to=%P&mask=%d > &smsc=%i&...) > > So when your mydlrscript.php receives the call from kannel with all values > populated by kannel for the selected parameters, it will use your own id > (myid in the example above) to identify which record to update, or if you > want to store everything, you can just add the whole information to your > database. > > Regards > > Alvaro > > > > |-----------------------------------------------------------------------------------------------------------------| > Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier > celular y Nextel > en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via SMS > y GPRS online > Visitenos en www.perusms.com > > On Thu, Oct 15, 2015 at 3:08 PM, Alejandro Mussi <alemu...@gmail.com> > wrote: > >> Hi Alvaro, >> >> How do i use dlr info? I did not find in User Guide to get the >> command_status using dlr info. Do i have to create a tlv ? >> >> I am trying with the following: >> >> Sending: >> >> >> domain.com:13013/cgi-bin/sendsms?username=kannel&password=XXXX&to=595981414XXX&from=1236&text=prueba+juego&dlr-mask=31&smsc=tigo&binfo=CJUEG&dlr-url=http%3A%2F%2Fdomain.com%2Ftest.php%3Fmetadata%3D%25D >> >> Getting from DLR the following: >> >> /test.php?metadata=%3Fsmpp_resp%3F >> >> >> Thanks >> >> On Wed, Oct 14, 2015 at 6:35 PM, Alvaro Cornejo <cornejo.alv...@gmail.com >> > wrote: >> >>> Hi Alejandro >>> >>> You need to store that in your app using dlr info. >>> >>> dlr table you set up in kannel config is only for internal dlr handling. >>> Once kannel receives the final status from the smsc for a particular sms, >>> it will delete its record; that is why this table (w3_sms in your case) >>> is almost always empty. >>> >>> Regards >>> >>> Alvaro >>> >>> >>> |-----------------------------------------------------------------------------------------------------------------| >>> Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier >>> celular y Nextel >>> en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via >>> SMS y GPRS online >>> Visitenos en www.perusms.com >>> >>> On Wed, Oct 14, 2015 at 4:21 PM, Alejandro Mussi <alemu...@gmail.com> >>> wrote: >>> >>>> Hi all, >>>> >>>> I have compiled kannel with mysql support but i still not getting the >>>> records of DLR in my DB. Here are my conf file and an example for sending a >>>> sms >>>> >>>> What i need is to store in some way the command_status for all >>>> sequence_number (as i get in bearerbox.log) >>>> >>>> Here is how i call the api to send sms and my conf file: >>>> >>>> >>>> >>>> http://domain:13013/cgi-bin/sendsms?username=kannel&password=XXX&to=595981414XXX&from=1244&text=Hello+world&dlr-mask=31&smsc=tigo >>>> >>>> >>>> # Default kannel configuration file >>>> group = core >>>> admin-port = 13000 >>>> admin-password = admin >>>> status-password = XXXX >>>> admin-deny-ip = "*.*.*.*" >>>> admin-allow-ip = "127.0.0.1" >>>> smsbox-port = 13001 >>>> #wapbox-port = 13002 >>>> box-deny-ip = "*.*.*.*" >>>> box-allow-ip = "127.0.0.1" >>>> wdp-interface-name = "*" >>>> log-file = "/var/log/kannel/bearerbox.log" >>>> log-level = 0 >>>> sms-resend-retry = 0 >>>> >>>> group = smsc >>>> smsc = smpp >>>> smsc-id = "tigo" >>>> allowed-smsc-id = "tigo" >>>> host = XXXXX >>>> port = 5600 >>>> smsc-username = "XXX" >>>> smsc-password = "XXX" >>>> system-type = "VMA" >>>> address-range = "" >>>> msg-id-type = 0x01 >>>> >>>> >>>> # SMSBOX GROUP >>>> >>>> group = smsbox >>>> bearerbox-host = localhost >>>> sendsms-port = 13013 >>>> sendsms-chars = "0123456789 +-" >>>> log-file = "/var/log/kannel/smsbox.log" >>>> log-level = 0 >>>> access-log = "/var/log/kannel/access.log" >>>> >>>> # SMS USER GROUP >>>> >>>> group = sendsms-user >>>> username = kannel >>>> password = XXXX >>>> concatenation = true >>>> max-messages = 3 >>>> max-messages = 10 >>>> >>>> # SMS SERVICE GROUP >>>> >>>> group = sms-service >>>> keyword = default >>>> accepted-smsc = "tigo" >>>> get-url = " >>>> http://domain/api/smpp.php?binfo=%B&keyword=%k&from=%p&to=%P&sw=%s&text=%a >>>> " >>>> accept-x-kannel-headers = true >>>> max-messages = 3 >>>> concatenation = true >>>> catch-all = true >>>> omit-empty = true >>>> denied-receiver-prefix = 5225;5445;5665;5885;1242;5555;1236;1237 >>>> >>>> group = mysql-connection >>>> id = mydlr >>>> host = localhost >>>> username = w3_sms >>>> password = XXX >>>> database = w3_sms >>>> max-connections = 1 >>>> >>>> group = dlr-db >>>> id = mydlr >>>> table = 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 >>>> >>>> Thanks for the support >>>> >>>> >>>> -- >>>> --------------------------------------------------------- >>>> Alejandro Mussi Campos Cervera >>>> >>> >>> >> >> >> -- >> --------------------------------------------------------- >> Alejandro Mussi Campos Cervera >> > > -- --------------------------------------------------------- Alejandro Mussi Campos Cervera