Added optional TLV for SMPP receipts

Added optional TLV for SMPP receipts SearchSearch
Author Message
Rik Clews
New member
Username: Rikclews

Post Number: 22
Registered: 08-2006
Posted on Tuesday, June 28, 2011 - 04:59 pm:   

We've been testing SMPP use on v2011.06.20, seemed to work OK, but a client has found that we are returning them an optional parameter "message_state", TLV (0x0427), but it has a different value to the submit_sm detail.

Along the lines of this:

12:21:56:402 (00000770) 193.132.40.160 <-: 173 byte packet
12:21:56:402 (00000770) 193.132.40.160 <-: 00 00 00 AD 00 00 00 05 00 00 00 00 00 00 BE 6A j
12:21:56:402 (00000770) 193.132.40.160 <-: 4E 4F 52 45 50 00 01 01 34 34 37 39 36 31 30 32 NOREP 44796102
12:21:56:417 (00000770) 193.132.40.160 <-: 31 37 33 38 00 05 00 54 65 73 74 00 04 00 00 00 1738 Test
12:21:56:417 (00000770) 193.132.40.160 <-: 00 00 00 00 00 77 69 64 3A 32 31 32 35 37 39 35 wid:2125795
12:21:56:417 (00000770) 193.132.40.160 <-: 33 32 30 20 73 75 62 3A 30 30 31 20 64 6C 76 72 320 sub:001 dlvr
12:21:56:417 (00000770) 193.132.40.160 <-: 64 3A 30 30 30 20 73 75 62 6D 69 74 20 64 61 74 d:000 submit dat
12:21:56:417 (00000770) 193.132.40.160 <-: 65 3A 31 31 30 36 32 38 31 32 31 35 20 64 6F 6E e:1106281215 don
12:21:56:417 (00000770) 193.132.40.160 <-: 65 20 64 61 74 65 3A 31 31 30 36 32 38 31 32 32 e date:110628122
12:21:56:417 (00000770) 193.132.40.160 <-: 31 20 73 74 61 74 3A 45 58 50 49 52 45 44 20 65 1 stat:EXPIRED e
12:21:56:417 (00000770) 193.132.40.160 <-: 72 72 3A 30 36 32 20 74 65 78 74 3A 53 4D 50 50 rr:062 text:SMPP
12:21:56:417 (00000770) 193.132.40.160 <-: 20 74 65 73 74 20 6D 65 73 73 61 67 65 test message
12:21:56:417 (00000770) 193.132.40.160 ->: 17 byte packet
12:21:56:417 (00000770) 193.132.40.160 ->: 00 00 00 11 80 00 00 05 00 00 00 00 00 00 BE 6A j
12:21:56:417 (00000770) 193.132.40.160 ->: 00
But out:

12:12:20:662 (000012E0) 87.86.36.99 ->: 00 00 00 B9 00 00 00 05 00 00 00 00 00 00 00 01
12:12:20:662 (000012E0) 87.86.36.99 ->: 4E 4F 52 45 50 00 01 01 34 34 37 39 36 31 30 32 NOREP 44796102
12:12:20:662 (000012E0) 87.86.36.99 ->: 31 37 33 38 00 05 00 54 65 73 74 00 04 00 00 00 1738 Test
12:12:20:662 (000012E0) 87.86.36.99 ->: 00 00 00 00 00 6E 69 64 3A 62 6C 75 35 31 38 45 nid:blu518E
12:12:20:662 (000012E0) 87.86.36.99 ->: 46 46 37 31 20 73 75 62 3A 30 30 31 20 64 6C 76 FF71 sub:001 dlv
12:12:20:662 (000012E0) 87.86.36.99 ->: 72 64 3A 30 30 30 20 73 75 62 6D 69 74 20 64 61 rd:000 submit da
12:12:20:662 (000012E0) 87.86.36.99 ->: 74 65 3A 31 31 30 36 32 32 32 33 33 37 20 64 6F te:1106222337 do
12:12:20:662 (000012E0) 87.86.36.99 ->: 6E 65 20 64 61 74 65 3A 31 31 30 36 32 32 32 33 ne date:11062223
12:12:20:662 (000012E0) 87.86.36.99 ->: 35 31 20 73 74 61 74 3A 45 58 50 49 52 45 44 20 51 stat:EXPIRED
12:12:20:662 (000012E0) 87.86.36.99 ->: 65 72 72 3A 30 30 30 20 74 65 78 74 3A 26 3F 0A err:000 text:&?
12:12:20:662 (000012E0) 87.86.36.99 ->: 74 50 3C 65 04 27 00 01 05 00 1E 00 0C 62 6C 75 tP<e ' blu
12:12:20:662 (000012E0) 87.86.36.99 ->: 35 31 38 45 46 46 37 31 00 518EFF71

This appears as EXPIRED for the receipt (expected) but the message_state is saying UNDELIVERABLE (05).

Our client uses message_state as a preference and this shows the status incorrectly - any suggestions?

Regards,

Rik
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 7968
Registered: 10-2002
Posted on Wednesday, June 29, 2011 - 05:08 am:   

Hi Rik,

From a TLV perspective, we have always treated EXPIRED the same as any other failure type. But, I do see where checking this value in message_state could be useful, and I know from recent posts that this is important for a new customer.

Des is on holiday this week and we are a bit short staffed, but this is likely a simple issue. I will see if I can get someone to apply a quick patch before end of day tomorrow.

-bn
Dave Baddeley
New member
Username: Davebaddeley

Post Number: 1
Registered: 06-2011
Posted on Wednesday, June 29, 2011 - 08:25 am:   

Bryce, a quick turn around on this is critical for us to retain this customer as they read the message_state TLV if provided in preference to the message text. Can you ensure that the message_state TLV is assigned the closest equivalent value to the stat: value from the SMPP 3.3 receipt mechanism; the values for message_state are listed under section 5.2.28 of the SMPP 3.4 specification.

Thanks
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 7969
Registered: 10-2002
Posted on Wednesday, June 29, 2011 - 02:08 pm:   

Hi Dave,

I've posted an update for smssmpp.dll only at http://www.nowsms.com/download/smssmpp20110629.zip, which shoukd generate the spec value for EXPIRED in message_state. It is necessary to stop the NowSMS service and manually update that file before restarting the service.

-bn
Dave Baddeley
New member
Username: Davebaddeley

Post Number: 2
Registered: 06-2011
Posted on Wednesday, June 29, 2011 - 02:21 pm:   

We'll get testing and let you know.

Thanks
Rik Clews
New member
Username: Rikclews

Post Number: 23
Registered: 08-2006
Posted on Wednesday, June 29, 2011 - 04:42 pm:   

Hi again, sad to say it looks unchanged - without putting to live I can't reliably test the EXPIRED but have found ACCEPTD set to DELIVERED, REJECTD is showing as UNDELIVERABLE, I restarted NowSMS to find REJECTD set as DELIVERED and UNDELIV set as DELIVERED. NB we are using Selenium SMPPSim V2.4.1 for theses tests.

As an example:

15:29:49:903 (000006D4) 127.0.0.1 <-: 163 byte packet
15:29:49:903 (000006D4) 127.0.0.1 <-: 00 00 00 A3 00 00 00 05 00 00 00 00 00 00 00 02
15:29:49:903 (000006D4) 127.0.0.1 <-: 00 00 01 30 37 39 36 31 30 32 31 37 33 38 00 05 07961021738
15:29:49:903 (000006D4) 127.0.0.1 <-: 00 54 65 73 74 00 04 00 00 00 00 00 00 00 00 73 Test s
15:29:49:903 (000006D4) 127.0.0.1 <-: 69 64 3A 37 36 32 38 37 39 20 73 75 62 3A 30 30 id:762879 sub:00
15:29:49:903 (000006D4) 127.0.0.1 <-: 31 20 64 6C 76 72 64 3A 30 30 31 20 73 75 62 6D 1 dlvrd:001 subm
15:29:49:903 (000006D4) 127.0.0.1 <-: 69 74 20 64 61 74 65 3A 31 31 30 36 32 39 31 35 it date:11062915
15:29:49:903 (000006D4) 127.0.0.1 <-: 32 39 20 64 6F 6E 65 20 64 61 74 65 3A 31 31 30 29 done date:110
15:29:49:903 (000006D4) 127.0.0.1 <-: 36 32 39 31 35 32 39 20 73 74 61 74 3A 55 4E 44 6291529 stat:UND
15:29:49:903 (000006D4) 127.0.0.1 <-: 45 4C 49 56 20 65 72 72 3A 30 30 30 20 54 65 78 ELIV err:000 Tex
15:29:49:903 (000006D4) 127.0.0.1 <-: 74 3A 53 4D 50 50 20 74 65 73 74 20 6D 65 73 73 t:SMPP test mess
15:29:49:903 (000006D4) 127.0.0.1 <-: 61 67 65 age
15:29:49:903 (000006D4) 127.0.0.1 ->: 17 byte packet
15:29:49:903 (000006D4) 127.0.0.1 ->: 00 00 00 11 80 00 00 05 00 00 00 00 00 00 00 02
15:29:49:903 (000006D4) 127.0.0.1 ->: 00
15:29:50:590 (00000968) 10.0.0.132 ->: 189 byte packet
15:29:50:590 (00000968) 10.0.0.132 ->: 00 00 00 BD 00 00 00 05 00 00 00 00 00 00 00 02
15:29:50:590 (00000968) 10.0.0.132 ->: 00 00 01 30 37 39 36 31 30 32 31 37 33 38 00 05 07961021738
15:29:50:590 (00000968) 10.0.0.132 ->: 00 54 65 73 74 00 04 00 00 00 00 00 00 00 00 78 Test x
15:29:50:590 (00000968) 10.0.0.132 ->: 69 64 3A 72 65 64 34 44 31 46 30 44 44 42 20 73 id:red4D1F0DDB s
15:29:50:590 (00000968) 10.0.0.132 ->: 75 62 3A 30 30 31 20 64 6C 76 72 64 3A 30 30 31 ub:001 dlvrd:001
15:29:50:590 (00000968) 10.0.0.132 ->: 20 73 75 62 6D 69 74 20 64 61 74 65 3A 31 31 30 submit date:110
15:29:50:590 (00000968) 10.0.0.132 ->: 36 32 39 31 35 32 39 20 64 6F 6E 65 20 64 61 74 6291529 done dat
15:29:50:590 (00000968) 10.0.0.132 ->: 65 3A 31 31 30 36 32 39 31 35 32 39 20 73 74 61 e:1106291529 sta
15:29:50:590 (00000968) 10.0.0.132 ->: 74 3A 55 4E 44 45 4C 49 56 20 65 72 72 3A 30 30 t:UNDELIV err:00
15:29:50:590 (00000968) 10.0.0.132 ->: 30 20 54 65 78 74 3A 53 4D 50 50 20 74 65 73 74 0 Text:SMPP test
15:29:50:590 (00000968) 10.0.0.132 ->: 20 6D 65 73 73 61 67 65 04 27 00 01 02 00 1E 00 message '
15:29:50:590 (00000968) 10.0.0.132 ->: 0C 72 65 64 34 44 31 46 30 44 44 42 00 red4D1F0DDB

Can you look into it? We were expecting more like:

01 ACCEPTD
02 DELIVRD
03 EXPIRED
04 DELETED
05 UNDELIV
06 ACCEPTD
07 UNKNOWN
08 REJECTD
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 7973
Registered: 10-2002
Posted on Wednesday, June 29, 2011 - 05:05 pm:   

Hi Rik,

Only EXPIRED is handled by that update.

-bn
Rik Clews
New member
Username: Rikclews

Post Number: 24
Registered: 08-2006
Posted on Wednesday, June 29, 2011 - 05:18 pm:   

Ah, not really going to work for us if the other statuses are incorrectly mapped though - especially if REJECTD and UNDELIV are showing as delivered - can we get the others set up too?
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 7974
Registered: 10-2002
Posted on Thursday, June 30, 2011 - 03:35 am:   

Argh. I guess I should not have assumed that you were referring only to EXPIRED (although to be honest, I'm not sure that any of the other status values beyond DELIVERED or ENROUTE have any real meaning).

The quick fix was intended only to address the EXPIRED status as detailed in the first message.

Another update parses out the other values. Again, it is just the single DLL at http://www.nowsms.com/download/nowsms20110630.zip

-bn
Dave Baddeley
New member
Username: Davebaddeley

Post Number: 3
Registered: 06-2011
Posted on Thursday, June 30, 2011 - 08:40 am:   

Bryce, the download link is broken!
Can you fix this ASAP so we can get testing.

Thanks

Dave
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 7977
Registered: 10-2002
Posted on Thursday, June 30, 2011 - 01:49 pm:   

Sorry. Hopefully you have been able to guess my mistake. http://www.nowsms.com/download/smssmpp20110630.zip
Rik Clews
New member
Username: Rikclews

Post Number: 25
Registered: 08-2006
Posted on Thursday, June 30, 2011 - 01:51 pm:   

Ha! should have guessed - thanks I'll give it a whirl...