Semion, you are right here. This isn't an opensmppbox issue but a generic-http issue.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Semion Spivak Sent: Thursday, 20 October, 2011 11:45 To: [email protected] Subject: Re: openssmppbox, generic http and dlrs Hi Steven, Try this request to the generic http-smsc listening interface: http://192.168.0.6:13015/dlr?username=xxxxxx&password=xxxxxx&from=xxxxxx&to= 0815&dlr-mid=a09885da-43c2-4553-af29-ac52a4952191&text=id%3Aa09885da-43c2-45 53-af29-ac52a4952191%20sub%3A001%20dlvrd%3A001%20submit%20date%3A1110201045% 20done%20date%3A1110201046%20stat%3ADELIVRD%20err%3A000%20text%3A please note that in DLRs you should swap "from" and "to" params, which is reasonable: the delivery report goes _from_ the subscriber's handset _to_ the originating source address. The "text" parameter is a url-encoded representation of the following string: id:a09885da-43c2-4553-af29-ac52a4952191 sub:001 dlvrd:001 submit date:1110201045 done date:1110201046 stat:DELIVRD err:000 text: where "stat" and "err" might be one of the following: DELIVRD 000 REJECTD 002 UNDELIV 001 EXPIRED 027 The "date" params are formatted with the following string: %y%m%d%H%M You can also add seconds to it ("%S"), which is convenient and I've seen some SMSCs doing that, but it violates SMPP v3.4 specs and requires calling an additional processing function in Kannel. I also noticed that "sub", "dlvrd" and "text" have no significance. I hope this helps. @all: should we add this DLR-generating example to the UG? It's not obvious and took me a while to get it working. On 20/10/11 10:09, Steven König wrote: > Hi, > > i'm trying to run the following scenario: > > 1. A smpp-Client connects to my opensmppbox and sends a message. > 2. The opensmppbox accepts the connection and also accepts the message. > 3. The opensmppbox routes the message to a generic http-smsc. > > Now the question: > > How can I send an DLR for statuses 1 or 2 back to kannel? > > I tried with: > http://192.168.0.6:13015/dlr?username=xxxxxx&password=xxxxxx&from=0815&to=xx xxx&dlr_mask=1&dlr-mid=a09885da-43c2-4553-af29-ac52a4952191 > > > But the Problem here is, that it accepts the dlr but at the conncted > opensmppbox the status is always REJECTD. It doesn't matter which value > the dlr-mask-parameter is set to. > > Heres the log for the dlr-request which is originated by the generic http: > > [...] DEBUG: DLR[internal]: Looking for DLR smsc=SMPP, ts=a09885da, > dst=xxxxx, type=-1 > [...] DEBUG: DLR[internal]: created DLR message for URL <a09885da> > [...] DEBUG: DLR[internal]: DLR not destroyed, still waiting for other > delivery report > [...] DEBUG: SMPP[SMPP]: Sending PDU: > [...] DEBUG: SMPP PDU 0x86e6038 dump: > [...] DEBUG: type_name: deliver_sm > [...] DEBUG: command_id: 5 = 0x00000005 > [...] DEBUG: command_status: 0 = 0x00000000 > [...] DEBUG: sequence_number: 1 = 0x00000001 > [...] DEBUG: service_type: NULL > [...] DEBUG: source_addr_ton: 2 = 0x00000002 > [...] DEBUG: source_addr_npi: 1 = 0x00000001 > [...] DEBUG: source_addr: "0815" > [...] DEBUG: dest_addr_ton: 1 = 0x00000001 > [...] DEBUG: dest_addr_npi: 1 = 0x00000001 > [...] DEBUG: destination_addr: "xxxxx" > [...] DEBUG: esm_class: 4 = 0x00000004 > [...] DEBUG: protocol_id: 0 = 0x00000000 > [...] DEBUG: priority_flag: 0 = 0x00000000 > [...] DEBUG: schedule_delivery_time: NULL > [...] DEBUG: validity_period: NULL > [...] DEBUG: registered_delivery: 0 = 0x00000000 > [...] DEBUG: replace_if_present_flag: 0 = 0x00000000 > [...] DEBUG: data_coding: 0 = 0x00000000 > [...] DEBUG: sm_default_msg_id: 0 = 0x00000000 > [...] DEBUG: sm_length: 0 = 0x00000000 > [...] DEBUG: short_message: > [...] DEBUG: Octet string at 0x86dfe58: > [...] DEBUG: len: 112 > [...] DEBUG: size: 1024 > [...] DEBUG: immutable: 0 > [...] DEBUG: data: 69 64 3a 61 30 39 38 38 35 64 61 20 73 75 62 3a > id:a09885da sub: > [...] DEBUG: data: 30 30 31 20 64 6c 76 72 64 3a 30 30 30 20 73 75 001 > dlvrd:000 su > [...] DEBUG: data: 62 6d 69 74 20 64 61 74 65 3a 31 31 31 30 32 30 bmit > date:111020 > [...] DEBUG: data: 30 39 35 30 20 64 6f 6e 65 20 64 61 74 65 3a 31 0950 > done date:1 > [...] DEBUG: data: 31 31 30 32 30 30 39 35 31 20 73 74 61 74 3a 52 > 110200951 stat:R > [...] DEBUG: data: 45 4a 45 43 54 44 20 65 72 72 3a 30 30 30 20 74 > EJECTD err:000 t > [...] DEBUG: data: 65 78 74 3a 20 20 20 20 20 20 20 20 20 20 20 20 ext: > [...] DEBUG: Octet string dump ends. > [...] DEBUG: message_state: 8 = 0x00000008 > [...] DEBUG: receipted_message_id: "a09885da" > [...] DEBUG: SMPP PDU dump ends. > > The next thing is, if I connect a smsbox instead of opensmppbox to > bearerbox and manually send an message over smsbox with dlr-mask = 31, > all generic http originated dlrs send to the above url work fine. > > Can anyone help me please and tell me the right url-parameters or > another solution for generating dlrs originated by the generic http smsc? > > here are my confs: > > kannel.conf: > > group = core > admin-port = 13000 > smsbox-port = 13001 > admin-password = bar > log-file = "/var/log/kannel/kannel-core.log" > log-level = 0 > access-log = "/var/log/kannel/kannel-access.log" > store-file = "/var/spool/kannel/kannel_core.store" > box-deny-ip = "*.*.*.*" > box-allow-ip = "127.0.0.1" > > group = sendsms-user > username = xxxxx > password = xxxxx > > group = sms-service > keyword = default > text = "No service specified" > > group = smsbox-route > smsbox-id = test1 > smsc-id = "smsc1" > > > group = smsc > smsc = http > system-type = generic > port = 13015 > smsc-id=smsc1 > send-url = > "http://192.168.0.99/gsm/sendtest.php?username=xxxxx&password=xxxxx&from=%P& to=%p&text=%b&dcs=%O&udh=%u&charset=%C&foreignId=%F&dlrReply=%A&dlrurl=%R&dl rval=%d&msgid=%I&cmsgid=%i" > > status-success-regex = "Sent." > status-permfail-regex = "failure" > status-tempfail-regex = "retry later" > generic-status-sent = 200 > generic-status-error = 404 > > > and my opensmppbox.conf: > > group = core > dlr-storage = internal > > group = opensmppbox > opensmppbox-id = test1 > opensmppbox-port = 2346 > bearerbox-host = localhost > bearerbox-port = 13001 > log-level = 0 > log-file = /var/log/kannel/opensmppbox.log > our-system-id = test1 > smpp-logins = "/etc/kannel/smpplogins.txt" > > > > > > Thanks, > Steven > -- Regards, Semion Spivak
