Send long messages

Post Reply
shshekeladze
Posts: 4
Joined: Tue Aug 20, 2019 12:33 pm

Send long messages

Post by shshekeladze »

Hi,

When I send long message Inetlab.SMPP library divides the message on short messages and sends them. Is it possible to specify the length of a short message that long message is divided on?

For example, if my messages is 320 chars length, the Inetlab.SMPP library divides this message as two 160 chars length messages and sends them. Is it possible to divide 320 chars message on 4 parts - 80 charts length messages?

Thanks a lot
alt
Site Admin
Posts: 992
Joined: Tue Apr 25, 2006 9:45 am

Re: Send long messages

Post by alt »

GSM stadard defines that one SMS message segment can be only 140 bytes or maximal 160 characters.
https://en.wikipedia.org/wiki/GSM_03.38

Do you have special requirements from your SMPP provider?

https://docs.inetlab.com/smpp/v2/articl ... ation.html
In this documentation article you can find an example how you can manually create SubmitSm PDU with concatenation parameters.
shshekeladze
Posts: 4
Joined: Tue Aug 20, 2019 12:33 pm

Re: Send long messages

Post by shshekeladze »

Thank you for reply.
I'll try...
shshekeladze
Posts: 4
Joined: Tue Aug 20, 2019 12:33 pm

Re: Send long messages

Post by shshekeladze »

Hi,

I cut long text into several parts (40 chars long) and created SubmitSm-s using CreateSumbitSmWithConcatenationInUDH method (from documentation).
Then Submitted SubmitSm-s one by one, here is my code

Code: Select all

//======================================================
List<string> parts = DevideText(text, 40); // cuts long message into parts (40 chars length)
ushort messageNo = 1;

foreach (string mess in parts)
{
    var smbt = CreateSumbitSmWithConcatenationInUDH(client, messageNo, (byte)parts.Count, (byte)messageNo, mess);

    var res = await client.Submit(smbt);

    Console.WriteLine("MessageID: {0}", res.MessageId);

    messageNo++;
}
//======================================================
is it correct?

Thanks a lot
shshekeladze
Posts: 4
Joined: Tue Aug 20, 2019 12:33 pm

Re: Send long messages

Post by shshekeladze »

Hi,

I've fixed it. I did not passed referenceNumber correctly.

Thanks
Post Reply