Deliver_SM not received on client

.NET library for SMPP protocol
Locked
didimo
Posts: 8
Joined: Thu Jan 23, 2014 9:23 pm

Deliver_SM not received on client

Post by didimo » Thu Jan 23, 2014 9:46 pm

Hi,
We have the following problem
SMPP Perl client running on Linux doesn't receive all Deliver_SM, there are some lost packets
We think it is network problem at client but we are not sure
We captured 2 stream packets (posted bellow), first one received on client (trace1) and second lost (trace2)
Could someone give us help on this?
Thanks a lot!

--------------------------------------------
trace1-positive deliver_sm
--------------------------------------------
No. Time Source Destination Protocol Length Info
11165 610.724592000 82.98.129.88 62.14.232.50 SMPP 268 SMPP Deliver_sm

Frame 11165: 268 bytes on wire (2144 bits), 268 bytes captured (2144 bits) on interface 0
Interface id: 0
Encapsulation type: Ethernet (1)
Arrival Time: Jan 23, 2014 16:47:29.995522000 Hora estándar romance
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1390492049.995522000 seconds
[Time delta from previous captured frame: 0.019099000 seconds]
[Time delta from previous displayed frame: 2.563804000 seconds]
[Time since reference or first frame: 610.724592000 seconds]
Frame Number: 11165
Frame Length: 268 bytes (2144 bits)
Capture Length: 268 bytes (2144 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ip:tcp:smpp]
Ethernet II, Src: Dell_c7:4c:1b (d4:ae:52:c7:4c:1b), Dst: Cisco_9f:f0:52 (00:00:0c:9f:f0:52)
Destination: Cisco_9f:f0:52 (00:00:0c:9f:f0:52)
Address: Cisco_9f:f0:52 (00:00:0c:9f:f0:52)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Source: Dell_c7:4c:1b (d4:ae:52:c7:4c:1b)
Address: Dell_c7:4c:1b (d4:ae:52:c7:4c:1b)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Type: IP (0x0800)
Internet Protocol Version 4, Src: 82.98.129.88 (82.98.129.88), Dst: 62.14.232.50 (62.14.232.50)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..00 = Explicit Congestion Notification: Not-ECT (Not ECN-Capable Transport) (0x00)
Total Length: 254
Identification: 0x0e43 (3651)
Flags: 0x02 (Don't Fragment)
0... .... = Reserved bit: Not set
.1.. .... = Don't fragment: Set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 128
Protocol: TCP (6)
Header checksum: 0x0000 [incorrect, should be 0xf1bb (may be caused by "IP checksum offload"?)]
[Good: False]
[Bad: True]
[Expert Info (Error/Checksum): Bad checksum]
[Message: Bad checksum]
[Severity level: Error]
[Group: Checksum]
Source: 82.98.129.88 (82.98.129.88)
Destination: 62.14.232.50 (62.14.232.50)
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Transmission Control Protocol, Src Port: ddi-tcp-1 (8888), Dst Port: 18749 (18749), Seq: 2398, Ack: 1399, Len: 202
Source port: ddi-tcp-1 (8888)
Destination port: 18749 (18749)
[Stream index: 35]
Sequence number: 2398 (relative sequence number)
[Next sequence number: 2600 (relative sequence number)]
Acknowledgment number: 1399 (relative ack number)
Header length: 32 bytes
Flags: 0x018 (PSH, ACK)
000. .... .... = Reserved: Not set
...0 .... .... = Nonce: Not set
.... 0... .... = Congestion Window Reduced (CWR): Not set
.... .0.. .... = ECN-Echo: Not set
.... ..0. .... = Urgent: Not set
.... ...1 .... = Acknowledgment: Set
.... .... 1... = Push: Set
.... .... .0.. = Reset: Not set
.... .... ..0. = Syn: Not set
.... .... ...0 = Fin: Not set
Window size value: 256
[Calculated window size: 256]
[Window size scaling factor: -1 (unknown)]
Checksum: 0xfaeb [validation disabled]
[Good Checksum: False]
[Bad Checksum: False]
Options: (12 bytes), No-Operation (NOP), No-Operation (NOP), Timestamps
No-Operation (NOP)
Type: 1
0... .... = Copy on fragmentation: No
.00. .... = Class: Control (0)
...0 0001 = Number: No-Operation (NOP) (1)
No-Operation (NOP)
Type: 1
0... .... = Copy on fragmentation: No
.00. .... = Class: Control (0)
...0 0001 = Number: No-Operation (NOP) (1)
Timestamps: TSval 1598264878, TSecr 553912767
Kind: Timestamp (8)
Length: 10
Timestamp value: 1598264878
Timestamp echo reply: 553912767
[SEQ/ACK analysis]
[Bytes in flight: 202]
[PDU Size: 202]
Short Message Peer to Peer, Command: Deliver_sm, Seq: 20, Len: 202
Length: 202
Operation: Deliver_sm (0x00000005)
Sequence #: 20
Service type: (Default)
Type of number (originator): Unknown (0x00)
Numbering plan indicator (originator): Unknown (0x00)
Originator address: 911196470
Type of number (recipient): Unknown (0x00)
Numbering plan indicator (recipient): Unknown (0x00)
Recipient address: +34609233763
.... ..00 = Messaging mode: Default SMSC mode (0x00)
..00 01.. = Message type: Short message contains SMSC Delivery Receipt (0x01)
00.. .... = GSM features: No specific features selected (0x00)
Protocol id.: 0x00
Priority level: GSM: None ANSI-136: Bulk IS-95: Normal (0x00)
Scheduled delivery time: Immediate delivery
Validity period: SMSC default validity period
.... ..00 = Delivery receipt: No SMSC delivery receipt requested (0x00)
.... 00.. = Message type: No recipient SME acknowledgement requested (0x00)
...0 .... = Intermediate notif: No intermediate notification requested (0x00)
.... ...0 = Replace: Don't replace (0x00)
Data coding: 0x00
SMPP Data Coding Scheme: SMSC default alphabet (0x00)
GSM SMS Data Coding
0000 .... = DCS Coding Group for SMS: SMS DCS: General Data Coding indication - Uncompressed text, no message class (0x00)
..0. .... = DCS Text compression: Uncompressed text
...0 .... = DCS Class present: No message class
.... 00.. = DCS Character set: GSM 7-bit default alphabet (0x00)
GSM CBS Data Coding
0000 .... = DCS Coding Group for CBS: CBS DCS: Language using the GSM 7-bit default alphabet (0x00)
..00 0000 = DCS CBS Message language: German (0x00)
Predefined message: 0
Message length: 148
Message

--------------------------------------------
trace2-lost deliver_sm
--------------------------------------------
No. Time Source Destination Protocol Length Info
11169 610.786199000 82.98.129.88 62.14.232.50 SMPP 268 SMPP Deliver_sm

Frame 11169: 268 bytes on wire (2144 bits), 268 bytes captured (2144 bits) on interface 0
Interface id: 0
Encapsulation type: Ethernet (1)
Arrival Time: Jan 23, 2014 16:47:30.057129000 Hora estándar romance
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1390492050.057129000 seconds
[Time delta from previous captured frame: 0.001540000 seconds]
[Time delta from previous displayed frame: 0.001540000 seconds]
[Time since reference or first frame: 610.786199000 seconds]
Frame Number: 11169
Frame Length: 268 bytes (2144 bits)
Capture Length: 268 bytes (2144 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ip:tcp:smpp]
Ethernet II, Src: Dell_c7:4c:1b (d4:ae:52:c7:4c:1b), Dst: Cisco_9f:f0:52 (00:00:0c:9f:f0:52)
Destination: Cisco_9f:f0:52 (00:00:0c:9f:f0:52)
Address: Cisco_9f:f0:52 (00:00:0c:9f:f0:52)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Source: Dell_c7:4c:1b (d4:ae:52:c7:4c:1b)
Address: Dell_c7:4c:1b (d4:ae:52:c7:4c:1b)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Type: IP (0x0800)
Internet Protocol Version 4, Src: 82.98.129.88 (82.98.129.88), Dst: 62.14.232.50 (62.14.232.50)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..00 = Explicit Congestion Notification: Not-ECT (Not ECN-Capable Transport) (0x00)
Total Length: 254
Identification: 0x0e44 (3652)
Flags: 0x02 (Don't Fragment)
0... .... = Reserved bit: Not set
.1.. .... = Don't fragment: Set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 128
Protocol: TCP (6)
Header checksum: 0x0000 [incorrect, should be 0xf1ba (may be caused by "IP checksum offload"?)]
[Good: False]
[Bad: True]
[Expert Info (Error/Checksum): Bad checksum]
[Message: Bad checksum]
[Severity level: Error]
[Group: Checksum]
Source: 82.98.129.88 (82.98.129.88)
Destination: 62.14.232.50 (62.14.232.50)
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Transmission Control Protocol, Src Port: ddi-tcp-1 (8888), Dst Port: 18749 (18749), Seq: 2600, Ack: 1452, Len: 202
Source port: ddi-tcp-1 (8888)
Destination port: 18749 (18749)
[Stream index: 35]
Sequence number: 2600 (relative sequence number)
[Next sequence number: 2802 (relative sequence number)]
Acknowledgment number: 1452 (relative ack number)
Header length: 32 bytes
Flags: 0x018 (PSH, ACK)
000. .... .... = Reserved: Not set
...0 .... .... = Nonce: Not set
.... 0... .... = Congestion Window Reduced (CWR): Not set
.... .0.. .... = ECN-Echo: Not set
.... ..0. .... = Urgent: Not set
.... ...1 .... = Acknowledgment: Set
.... .... 1... = Push: Set
.... .... .0.. = Reset: Not set
.... .... ..0. = Syn: Not set
.... .... ...0 = Fin: Not set
Window size value: 255
[Calculated window size: 255]
[Window size scaling factor: -1 (unknown)]
Checksum: 0xfaeb [validation disabled]
[Good Checksum: False]
[Bad Checksum: False]
Options: (12 bytes), No-Operation (NOP), No-Operation (NOP), Timestamps
No-Operation (NOP)
Type: 1
0... .... = Copy on fragmentation: No
.00. .... = Class: Control (0)
...0 0001 = Number: No-Operation (NOP) (1)
No-Operation (NOP)
Type: 1
0... .... = Copy on fragmentation: No
.00. .... = Class: Control (0)
...0 0001 = Number: No-Operation (NOP) (1)
Timestamps: TSval 1598264884, TSecr 553916783
Kind: Timestamp (8)
Length: 10
Timestamp value: 1598264884
Timestamp echo reply: 553916783
[SEQ/ACK analysis]
[This is an ACK to the segment in frame: 11168]
[The RTT to ACK the segment was: 0.001540000 seconds]
[Bytes in flight: 202]
[PDU Size: 202]
Short Message Peer to Peer, Command: Deliver_sm, Seq: 21, Len: 202
Length: 202
Operation: Deliver_sm (0x00000005)
Sequence #: 21
Service type: (Default)
Type of number (originator): Unknown (0x00)
Numbering plan indicator (originator): Unknown (0x00)
Originator address: 911196470
Type of number (recipient): Unknown (0x00)
Numbering plan indicator (recipient): Unknown (0x00)
Recipient address: +34629247693
.... ..00 = Messaging mode: Default SMSC mode (0x00)
..00 01.. = Message type: Short message contains SMSC Delivery Receipt (0x01)
00.. .... = GSM features: No specific features selected (0x00)
Protocol id.: 0x00
Priority level: GSM: None ANSI-136: Bulk IS-95: Normal (0x00)
Scheduled delivery time: Immediate delivery
Validity period: SMSC default validity period
.... ..00 = Delivery receipt: No SMSC delivery receipt requested (0x00)
.... 00.. = Message type: No recipient SME acknowledgement requested (0x00)
...0 .... = Intermediate notif: No intermediate notification requested (0x00)
.... ...0 = Replace: Don't replace (0x00)
Data coding: 0x00
SMPP Data Coding Scheme: SMSC default alphabet (0x00)
GSM SMS Data Coding
0000 .... = DCS Coding Group for SMS: SMS DCS: General Data Coding indication - Uncompressed text, no message class (0x00)
..0. .... = DCS Text compression: Uncompressed text
...0 .... = DCS Class present: No message class
.... 00.. = DCS Character set: GSM 7-bit default alphabet (0x00)
GSM CBS Data Coding
0000 .... = DCS Coding Group for CBS: CBS DCS: Language using the GSM 7-bit default alphabet (0x00)
..00 0000 = DCS CBS Message language: German (0x00)
Predefined message: 0
Message length: 148
Message
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Deliver_SM not received on client

Post by alt » Tue Feb 18, 2014 4:42 pm

I don't know how Perl client works. But possible it doesnt deserialize whole network stream. When one network buffer contains more than one SMPP PDU.
didimo
Posts: 8
Joined: Thu Jan 23, 2014 9:23 pm

Re: Deliver_SM not received on client

Post by didimo » Tue Feb 18, 2014 5:01 pm

hi!
we've found that sometimes perl client doesn't listen for dlr pdu so our server is raising a timeout after 120s
we will implement dlr notifications retry to clients for these case and others
for that we need to manage our dlr id when sending deliver_receipt pdu y receiving sending deliver_receipt_resp pdu

i've found it is quiet simple doing on synchronus notification
i.e.
IList<Inetlab.SMPP.PDU.DeliverSmResp> results = client.Deliver(...)
Inetlab.SMPP.PDU.DeliverSmResp deliverSmResp = results[0];
if (deliverSmResp.Status == CommandStatus.ESME_ROK)
{
// discard dlr by id
}
else
{
// flag dlr by id for next retry
}

but how can I do it when doing asynchronous?
I can't find any id/ref param on DeliverAsync() method so it is returned on callback
client_evDeliverComplete(object sender, Inetlab.SMPP.PDU.DeliverSmResp data)
for keep dlr id

could you give us some help on this?

thanks
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Deliver_SM not received on client

Post by alt » Tue Feb 18, 2014 5:42 pm

since version 1.1.14.2 event evDeliverComplete(object sender, Inetlab.SMPP.PDU.DeliverSmResp data) is raised even when client had time out or disconnected.

i think you need some kind of dictionary where you store correlation between deliverSm.Sequence and 'dlr id'
in evDeliverComplete handler you just get your 'dlr id' by deliverSmResp.Sequence.

You can set deliverSm.Sequence before DeliverAsync with code

Code: Select all

deliverSm.Sequence = Client.SequenceGenerator.NextSequenceNumber();
Locked