Multipart or Long message problem - Demo Application

.NET library for SMPP protocol
Locked
shazia1
Posts: 12
Joined: Wed Nov 16, 2011 10:22 am

Multipart or Long message problem - Demo Application

Post by shazia1 » Fri Nov 18, 2011 5:10 am

Whenever I try to send a large message from demo server, to the client, the code crashes at client.Deliver(data) method with the following exception: "Value was either too large or too small for an unsigned byte".

Am I missing some attribute needing to be added in the sending message?
What is the max msg size which can be send from server?
shazia1
Posts: 12
Joined: Wed Nov 16, 2011 10:22 am

Re: Multipart or Long message problem - Demo Application

Post by shazia1 » Fri Nov 18, 2011 5:12 am

One more problem ..Refer to the demo application available with trial, when i send shortmessage from client, the message is properly received on the server. But when i send Payload message from client, in the server_evClientSubmitSm() event of server, data.ShortMessage is null. I am unable to verify whether my long message is received properly on the other end or not.
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Multipart or Long message problem - Demo Application

Post by alt » Fri Nov 18, 2011 9:17 am

When you send in payload you can get message text with code

var text = client.GetMessageText(data.Optional[OptionalTags.MessagePayload], data.DataCoding);
shazia1
Posts: 12
Joined: Wed Nov 16, 2011 10:22 am

Re: Multipart or Long message problem - Demo Application

Post by shazia1 » Fri Nov 18, 2011 12:59 pm

Thanks, the message can be seen now. But long messages are received in splitted parts.
SHould it not be a complete concatenated message? Or this is receiving end's responsibility to receive splitted messages and concat them by it self?
shazia1
Posts: 12
Joined: Wed Nov 16, 2011 10:22 am

Re: Multipart or Long message problem - Demo Application

Post by shazia1 » Wed Jan 25, 2012 11:30 am

Kindly update me on the last post ASAP.
We are facing this issue in real time environment as well. Long messages are received in splitted parts at receiver's end.
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Multipart or Long message problem - Demo Application

Post by alt » Mon Jan 30, 2012 8:31 am

Do you send message as payload? Possible you need to send message with SubmitMode.ShortMessage.
hishhash2
Posts: 17
Joined: Mon Jan 30, 2012 11:24 am

Re: Multipart or Long message problem - Demo Application

Post by hishhash2 » Mon Jan 30, 2012 1:42 pm

I was testing the long message receiving at Server side from client and stuck at the following scenario.

Using Inetlab SMPP client I am submitting a long message using SubmitMode.ShortMessage. From the server side i am receiving each portion of the message as seperate _smppServer_evClientSubmitSm events. Below is the Screenshot of the watch i have added to the SubmitSm data object.

Image

It is clear from the UserDataPdu.Headers that there are 2 segments and the current is segment number and also a sequence number also(from above screenshot it is 158).

Is there a an easy way to parse the Header and get the Sequence number.

I also want to test the DLL when Server sends long message to client.
shazia1
Posts: 12
Joined: Wed Nov 16, 2011 10:22 am

Re: Multipart or Long message problem - Demo Application

Post by shazia1 » Tue Jan 31, 2012 5:21 am

Hi hishhash2,
You need to traverse TLV parameters for sequence no.

Alt,
I am sending a long message, and hence used payload mode. But still each portion of the message is received in a separate smppServer_evClientSubmitSm event on server.

Moreover my 2nd important question is that, the return type of TLV parameters are byte[]. And all TLV parameters (except the message itself), is placed in plain text at 1st dimension of byte[]. Now when I try to convert that byte array into string by using "GetMessageText" or decoding it by different encoding methods, only garbage ASCII symbols are returned. What I personally think is that, either those TLV parameters should return string, or the values should be converted into byte[] before it is assigned to TLV parameters.

Please see the below logs for further clarification.
An early response is awaited.

Thanks.


==========================================================================================================

26.01.2012 16:12:24 | Info |SMPPClient |SendSMS | Checking TLV Parameters of Sending Message Chunk(s) ...
26.01.2012 16:12:26 | Info |SMPPClient |SendSMS | Chunks#1:
26.01.2012 16:12:26 | Info |SMPPClient |SendSMS | TLV[0].Length: 2
26.01.2012 16:12:26 | Info |SMPPClient |SendSMS | TLV[0].Tag: 524
26.01.2012 16:12:26 | Info |SMPPClient |SendSMS | TLV[0].TagValue: SARReferenceNumber
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[0].Value (English): s
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[0].Value (ASCII): s
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[0].Value (Default): s
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[0].Value (Unicode): 猀
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[0].Value (UTF8): s
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[0].Value (UTF7): s
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[0].Value (GetMessageText): @s
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[0].Value (byteArray[0]): 0
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[1].Length: 1
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[1].Tag: 527
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[1].TagValue: SARSequenceNumber
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[1].Value (English):
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[1].Value (ASCII):
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[1].Value (Default):
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[1].Value (Unicode): �
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[1].Value (UTF8):
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[1].Value (UTF7):
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[1].Value (GetMessageText): £
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[1].Value (byteArray[0]): 1
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[2].Length: 1
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[2].Tag: 526
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[2].TagValue: SARTotalSegments
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[2].Value (English):
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[2].Value (ASCII):
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[2].Value (Default):
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[2].Value (Unicode): �
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[2].Value (UTF8):
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[2].Value (UTF7):
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[2].Value (GetMessageText): $
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[2].Value (byteArray[0]): 2
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[3].Length: 1
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[3].Tag: 1062
26.01.2012 16:12:27 | Info |SMPPClient |SendSMS | TLV[3].TagValue: MoreMessagesToSend
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[3].Value (English):
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[3].Value (ASCII):
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[3].Value (Default):
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[3].Value (Unicode): �
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[3].Value (UTF8):
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[3].Value (UTF7):
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[3].Value (GetMessageText): £
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[3].Value (byteArray[0]): 1
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[4].Length: 134
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[4].Tag: 1060
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[4].TagValue: MessagePayload
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[4].Value (English): On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use the
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[4].Value (ASCII): On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use the
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[4].Value (Default): On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use the
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[4].Value (Unicode): 湏琠敨䤠獮牥⁴慴Ɫ琠敨朠污敬楲獥椠据畬敤椠整獭琠慨⁴牡⁥敤楳湧摥琠潣牯楤慮整眠瑩⁨桴⁥癯牥污潬歯漠⁦潹牵搠捯浵湥⹴夠畯挠湡甠敳琠敨
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[4].Value (UTF8): On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use the
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[4].Value (UTF7): On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use the
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[4].Value (GetMessageText): On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use the
26.01.2012 16:12:28 | Info |SMPPClient |SendSMS | TLV[4].Value (byteArray[0]): 79

26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | Chunks#2:
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | DataCoding: ASCII
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | DefaultMsgId: 0
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | DestAddr: 0501253710
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | DestNpi: 0
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | DestTon: 0
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | EsmClass: 0
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | Length: 16
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | MessageMode: Default
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | MessageType: Default
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | Notification: NotRequested
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | TLV[0].Length: 2
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | TLV[0].Tag: 524
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | TLV[0].TagValue: SARReferenceNumber
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | TLV[0].Value (English): s
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | TLV[0].Value (ASCII): s
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | TLV[0].Value (Default): s
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | TLV[0].Value (Unicode): 猀
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | TLV[0].Value (UTF8): s
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | TLV[0].Value (UTF7): s
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | TLV[0].Value (GetMessageText): @s
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | TLV[0].Value (byteArray[0]): 0
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | TLV[1].Length: 1
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | TLV[1].Tag: 527
26.01.2012 16:12:31 | Info |SMPPClient |SendSMS | TLV[1].TagValue: SARSequenceNumber
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[1].Value (English):
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[1].Value (ASCII):
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[1].Value (Default):
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[1].Value (Unicode): �
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[1].Value (UTF8):
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[1].Value (UTF7):
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[1].Value (GetMessageText): $
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[1].Value (byteArray[0]): 2
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[2].Length: 1
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[2].Tag: 526
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[2].TagValue: SARTotalSegments
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[2].Value (English):
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[2].Value (ASCII):
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[2].Value (Default):
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[2].Value (Unicode): �
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[2].Value (UTF8):
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[2].Value (UTF7):
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[2].Value (GetMessageText): $
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[2].Value (byteArray[0]): 2
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[3].Length: 1
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[3].Tag: 1062
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[3].TagValue: MoreMessagesToSend
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[3].Value (English):
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[3].Value (ASCII):
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[3].Value (Default):
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[3].Value (Unicode): �
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[3].Value (UTF8):
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[3].Value (UTF7):
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[3].Value (GetMessageText):
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[3].Value (byteArray[0]): 0
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[4].Length: 103
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[4].Tag: 1060
26.01.2012 16:12:32 | Info |SMPPClient |SendSMS | TLV[4].TagValue: MessagePayload
26.01.2012 16:12:33 | Info |SMPPClient |SendSMS | TLV[4].Value (English): se galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks
26.01.2012 16:12:33 | Info |SMPPClient |SendSMS | TLV[4].Value (ASCII): se galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks
26.01.2012 16:12:33 | Info |SMPPClient |SendSMS | TLV[4].Value (Default): se galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks
26.01.2012 16:12:33 | Info |SMPPClient |SendSMS | TLV[4].Value (Unicode): 敳朠污敬楲獥琠湩敳瑲琠扡敬ⱳ栠慥敤獲‬潦瑯牥ⱳ氠獩獴‬潣敶⁲慰敧ⱳ愠摮漠桴牥搠捯浵湥⁴畢汩楤杮戠潬正�
26.01.2012 16:12:33 | Info |SMPPClient |SendSMS | TLV[4].Value (UTF8): se galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks
26.01.2012 16:12:33 | Info |SMPPClient |SendSMS | TLV[4].Value (UTF7): se galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks
26.01.2012 16:12:33 | Info |SMPPClient |SendSMS | TLV[4].Value (GetMessageText): se galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks
26.01.2012 16:12:33 | Info |SMPPClient |SendSMS | TLV[4].Value (byteArray[0]): 115

=====================================================================================================================
hishhash2
Posts: 17
Joined: Mon Jan 30, 2012 11:24 am

Re: Multipart or Long message problem - Demo Application

Post by hishhash2 » Tue Jan 31, 2012 6:06 am

Hi shazia,

When the submit mode is SubmitMode.Payload then i can traverse TLV parameters from Optional parameter. But when the submit mode is SubmitMode.ShortMessage then the data.Optional is null. Then the sequence and segment numbers comes with the data.UserdataPdu.Headers. My question is how do i parse this header to take out the sequence numbers. Isn't there a chance that the data.UserdataPdu.Headers can have other information too...

Please check the image from my previous reply above...

Please suggest me if i have to move this message into another question.
Locked