Page 1 of 1

long message

Posted: Mon Oct 11, 2010 4:46 pm
by rakan
im using inetlab smpp server when i send a 320 char long message from Smpp client , how is the message sent in 2 parts , can any expline how i can recived 1 mesage in mobile

Posted: Sat Oct 16, 2010 2:04 pm
by alt
when short_message is longer then 140 bytes it should be splited on parts as defined in GSM standard.
Every mobile phone support concatenated messages and you should see on the screen one message.

Re: long message

Posted: Wed Nov 16, 2011 11:09 am
by shazia1
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?

Re: long message

Posted: Fri Nov 18, 2011 9:07 am
by alt
Could you post here stack trace and code you use.

Re: long message

Posted: Fri Nov 18, 2011 11:54 am
by shazia1
The is same as used in demo application server:

Code: Select all

               
                Inetlab.SMPP.PDU.DeliverSm data = new Inetlab.SMPP.PDU.DeliverSm();

                data.SourceAddrTon = byte.Parse(tbSrcAdrTON.Text);
                data.SourceAddrNpi = byte.Parse(tbSrcAdrTON.Text);
                data.SourceAddr = tbSrcAdr.Text;

                data.DestAddrTon = byte.Parse(tbDestAdrTON.Text);
                data.DestAddrNpi = byte.Parse(tbDestAdrNPI.Text);
                data.DestAddr = tbDestAdr.Text;

                data.DataCoding = GetDataCoding();
                data.UserDataPdu = new Inetlab.SMPP.Common.UserData();
                data.UserDataPdu.ShortMessage = _client.GetMessageBytes(tbSend.Text, data.DataCoding);
               _client.Deliver(data);
And the stack trace is as follows:

" at System.Convert.ToByte(Int32 value)\r\n at Inetlab.SMPP.PDU.DeliverSm.WddAOCwt0e()\r\n at Inetlab.SMPP.PDU.DeliverSm.GetBytes()\r\n at Inetlab.SMPP.Common.SmppClientBase.FWEGyqKuL()\r\n at System.Threading.ThreadHelper.ThreadStart_Context(Object state)\r\n at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at System.Threading.ThreadHelper.ThreadStart()"

Re: long message

Posted: Fri Nov 25, 2011 1:36 pm
by alt
Hi shazia1,

data.UserDataPdu.ShortMessage cannot be longer than 140 bytes regarding GSM standard.

It seems you need something like PrepareSubmit that return SubmitSm list in SmppClient class, but in your case you need to generate concatenated DeliverSm parts.
Usually for SMPP proxy you receive DeliverSm parts from SMSC and then just forward them to recipient. Do you concatenate text parts when you receive from SMSC, or do you havw different workflow?

Re: long message

Posted: Mon Nov 28, 2011 5:04 am
by shazia1
This is not my application flow. I was just trying to send messages from server to client and client to server in demo application. And everytime on sending a long message to client, the server gets crashed.

Re: long message

Posted: Wed Nov 30, 2011 8:43 am
by alt
Ok, I'm going to add helper methods for sending concatenated DeliverSm messages.

helper methods for sending concatenated DeliverSm messages

Posted: Tue Jan 31, 2012 6:55 am
by hishhash2
HI alt,

I am testing a situation where in which my smpp server acts as SMSC and i want to send Long Messages to the clients which are like 400 characters or more. At the moment the following code throws an error when the message length is more.

Code: Select all

data.UserDataPdu.ShortMessage = _client.GetMessageBytes(MsgLengthMorethan400, data.DataCoding);
It would have been really great if there is a way to get concatenated DeliverSm parts, like in the current PrepareSubmit that return SubmitSm list in SmppClient class.

Appreciate your reply...

Re: long message

Posted: Wed Feb 01, 2012 12:14 pm
by alt
Hi

I'm going to add fluent SMS builder as replacement of PrepareSubmit. It will work with SubmitSm, SubmitSmMulti and DeliverSm.

Here is example of code:

Code: Select all

SMS.With()
.Text("Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test")
.From("1111")
.To("2222")
.Coding(DataCodings.UCS2)