DeliverSm Concatenated Messages

.NET library for SMPP protocol
Locked
smpp1000
Posts: 5
Joined: Tue Dec 17, 2013 10:10 am

DeliverSm Concatenated Messages

Post by smpp1000 » Fri Jul 11, 2014 12:46 pm

I'm having a little trouble processing concatenated messages received from my SMS aggregator and I'm wondering if anyone can help.

From looking at the demo code and the example found here http://wiki.inetlab.com/doku.php/smpp/c ... ng_started it should be as simple as adding each message part to the message composer and then calling GetFullMessage however the evDeliverSm event only fires once and not once per message part as I believe it should do?

When debugging I can see that DeliverSm.Concatenation isn't null and contains the right number of messages in the total property. Adding the single message to the message composer and calling GetFullMessage doesn't return the whole message just the text from the first part of the message.

Anyone know what I'm missing and if that event should fire for each message part?

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

Re: DeliverSm Concatenated Messages

Post by alt » Fri Jul 11, 2014 1:45 pm

Hi,

evDeliverSm event should fire once per message part. When last message part has been come, composer.IsLastSegment returns true. Then you can run GetFullMessage.
Also you can use events evFullMessageReceived and evFullMessageTimedout. In this case you need to call only AddMessage method in evDeliverSm event handler.

But don't use GetFullMessage and evFullMessageReceived at the same time. MessageComposer removes stored parts after call of one of these methods.

Please also note that evDeliverSm event handler is called from different thread. You need to pay attention to this when debugging.
smpp1000
Posts: 5
Joined: Tue Dec 17, 2013 10:10 am

Re: DeliverSm Concatenated Messages

Post by smpp1000 » Fri Jul 11, 2014 2:17 pm

Thanks for the response. This is what I suspected however the evDeliverSm only fires once for a multi-part message and composer.IsLastSegment never evaluates as true...
smpp1000
Posts: 5
Joined: Tue Dec 17, 2013 10:10 am

Re: DeliverSm Concatenated Messages

Post by smpp1000 » Fri Jul 11, 2014 4:01 pm

Oh and just to mention the MessageComposer class doesn't have any events like you mention. I can see them in your example here http://wiki.inetlab.com/doku.php/smpp/messagecomposer however Inetlab.SMPP.dll version 1.1.11.2 doesn't have them?
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: DeliverSm Concatenated Messages

Post by alt » Sat Jul 19, 2014 9:40 pm

They were added in version 1.1.12.0. Could you try with latest version?
Locked