[SMPP] Sending long SMS through SMPP
SMS is designed to send small text messages upto 140 chars. It actually depends upon the encoding. Using 7 bit encoding, you can send 160 chars, using Unicode, you can only send 70 chars. The data is carried in User Data section.
This post talks about ways of sending Long message using SMPP
Using SMPP we can send long SMS by two means
Using Payload option
Submit SM PDU has a field called message_payload. Set the data in it and you can send upto 64K octets. But this option is not supported by a lot of provider. Verify with your provider, if they support the same.
Using Message fragementation
This format is more common and widely supported. Essentially, the long SMS is divided into smaller messages and send with a particular format, by setting UDH.
The key TLV options used are
sar_msg_ref_num - The reference number for a particular concatenated short message
sar_total_segments - Indicates the total number of short messages within the concatenated short message
sar_segment_seqnum - Indicates the sequence number of a particular short message fragment within the concatenated short message
How do you set these, depends upon the SMPP library you use. Will brief the algo
- Break the long sms into parts, so that fragement can fit into single Submit SM PDU
- The total number of fragements shall give the value of sar_total_segments
- Generate a unique identifier value, this becomes the values of sar_msg_ref_num
- Now in a loop send the message fragements, with values in step above. sar_segment_seqnum values shall be the value of the loop count (ensure that it starts from 1)
This is it

Thanks, It is small but give me very useful idea to search ahead for it.
Hi,
I am unable to send some special characters through smpp like £(pound) ,• (bullet).
can you tell me how to generate unique sar_msg_ref_num for messages.I am using random number to generate for this.But some times we may get same random number diff requests.In that case both messages will be failed.
Vikram, I am not sure about how to send them. Can you try jsmpp forum.
Hi,
I am getting special chracters through smpp using my java code..
Now I am gettting diff problem.I am not getting long sms in one updation.In several updation I am getting complete long sms.
Is there any way to get complete sms in one updation???
Please help me…
Hi,
For each SubmitSM of the message fragment, do we get a SubmitSMResp?
Pls clarify
Yes it will. try it with real SMSC
Thanx a lot!!
Can anyone told me how can I add the optional paramter after the mandatory parameter. Can give me a example?
Can any body, please share java code to send Long SMS messages using SMPP Version 3.4?
How does JSMPP send 3000 – 5000 messages per second?
Meaning, is this by creating multiple threads or any particular mechanism.
Thanks in advance!!
Yup it uses Executors for the same. Though the number is not guranteed. A lot depends on how soon the SMPP Server is responding back to requests.
Thanks for the quick reply Ashish
What do you mean when you say by setting UDH?
There is a way of adding chars to the PDU but is not working on my SMPP Client
I think it’s because I’m not reciving the sm_resp from the SMSC and using the value.
Can you help me giving me a php code example of how you do this?
Thanks a lot.
Hi Ashish,
I have a query with regard to fragmentation. I need to send a long message using fragmentation i.e. dividing a long message into multiple short messages. Now, this has to be done along with encoding, say GSM 7-Bit. There are two scenarios:
a) Need to send fragments using SAR TLVs. The question arises whether I will fragment messages first and then encode it or other way. Let’s say I have original message spanning (in ASCII) 400 octets. Now, If I encode this message into GSM 7-Bit, then it converts to 350 octets (400 * 7/8). If I follow encode first, fragment next, then it means 3 fragments of 140, 140, 70 octets. What is the ideal way of doing it?
b) Need to send fragments using UDH. I have same question over ordering of encoding & fragmentation.
Please reply ASAP.
Hi can any body tell me how to send long concatenated sms using Logica smpp. Can somebody give me code to send long sms Please help.Thanks in advance.
hi
any one reply me plz…
i am send sms using jsmpp the msg send successfuly but cant able to read….it says “Unable to open. Message format not supported”
i am new for this…
how can identify find the error i dont knw wat to do..any one helpme its urgent……..