How to send long SMS

1,417 views
Skip to first unread message

imranrazakhan

unread,
Sep 6, 2008, 8:23:35 AM9/6/08
to jsmpp
Hi,

i downloaded JSMPP and check the file longsms.java but cant figureout
how to send long sms.

Please include one example to send long sms.

Regards,

uud ashr

unread,
Sep 7, 2008, 10:52:05 PM9/7/08
to js...@googlegroups.com
Hi, 

Sorry the longsms.java is just an experimental java file.
Basically the long sms or message concatenation is not defined on SMPP Spec, it defined on GSM 03.40

There is a 3 way to send long sms.
  1. Segmenting the sms and using the optional parameters. It will need 3 optional parameters SAR_MSG_REF_NUM, SAR_SEGMENT_SEQNUM and SAR_SEGMENT_SEQNUM
  2. Segmentation automatically by the SMSC. This done if you put the message on optional parameter MESSAGE_PAYLOAD. The parameter SM_LENGTH should be set to 0 and SHORT_MESSAGE should be set to null.
  3. Manually by composing header on the short_message parameter, if you do this you should set the udhi (on esm_class) but I didn't have further knowledge about this.
Regards, 
uudashr

uud ashr

unread,
Sep 7, 2008, 10:52:51 PM9/7/08
to js...@googlegroups.com
You might want to check org.jsmpp.examples.SubmitLongMessageExample from the latest repository.

imranrazakhan

unread,
Sep 8, 2008, 4:02:52 AM9/8/08
to jsmpp
Hi,

I downloaded jsmpp-2.0b_03-src.zip but i didnt find any example named
org.jsmpp.examples.SubmitLongMessageExample

Regards,
imran

On Sep 8, 8:52 am, "uud ashr" <uuda...@gmail.com> wrote:
> You might want to check org.jsmpp.examples.SubmitLongMessageExample from the
> latest repository.
>
> On Mon, Sep 8, 2008 at 9:52 AM, uud ashr <uuda...@gmail.com> wrote:
> > Hi,
> > Sorry the longsms.java is just an experimental java file.
> > Basically the long sms or message concatenation is not defined on SMPP
> > Spec, it defined on GSM 03.40
>
> > There is a 3 way to send long sms.
>
> >    1. Segmenting the sms and using the optional parameters. It will need 3
> >    optional parameters SAR_MSG_REF_NUM, SAR_SEGMENT_SEQNUM
> >    and SAR_SEGMENT_SEQNUM
> >    2. Segmentation automatically by the SMSC. This done if you put the
> >    message on optional parameter MESSAGE_PAYLOAD. The parameter SM_LENGTH
> >    should be set to 0 and SHORT_MESSAGE should be set to null.
> >    3. Manually by composing header on the short_message parameter, if you
> >    do this you should set the udhi (on esm_class) but I didn't have further
> >    knowledge about this.
>
> > Regards,
> > uudashr
>

uud ashr

unread,
Sep 8, 2008, 4:30:03 AM9/8/08
to js...@googlegroups.com
Sorry, its still on the subversion repo.

Imran Raza Khan

unread,
Sep 8, 2008, 5:23:29 AM9/8/08
to js...@googlegroups.com
Hi,

Sorry i couldnt get you, can i access that example or not?

Regards,

--
Imran Raza Khan
Assitsan Manager IT-VAS
Warid Telecom, Lahore.

uud ashr

unread,
Sep 8, 2008, 5:49:57 AM9/8/08
to js...@googlegroups.com
Basically you can use subversion client to checkout the source code directly from subversion repositories (server). So when there is some patch or changes made to the source code, you can get it ASAP.


I also attach the source distribution.

Regards, 
uudashr
src.zip

Imran Raza Khan

unread,
Sep 9, 2008, 4:53:25 AM9/9/08
to js...@googlegroups.com
Hi,

I tried example to send long message but i never receive on my mobile.

Please find attached ethereal trace.

Regards,
imran

longsms.trace

uud ashr

unread,
Sep 10, 2008, 11:41:13 AM9/10/08
to js...@googlegroups.com
Did you have any messsage id returned from SMPPSession#submitShortMessage(...) ?
I didn't find any message id from submit_sm_resp on the ethereal trace, but the strange is the command_status is 0 (it should be succeed).

It would be better if you ask the SMSC vendor about this case (about how to send long SMS).

Imran Raza Khan

unread,
Sep 10, 2008, 11:48:30 AM9/10/08
to js...@googlegroups.com
hi,

I am successful in sending long message by setting UDH. but i thing
setting optional parameter dont work.
SAR_MSG_REF_NUM
SAR_SEGMENT_SEQNUM
SAR_SEGMENT_SEQNUM

Regards

uud ashr

unread,
Sep 10, 2008, 12:36:04 PM9/10/08
to js...@googlegroups.com
Can you tell me how did you do that?

AFAIK the UDHI works if you compose the short_message that contains user header.

Imran Raza Khan

unread,
Sep 10, 2008, 1:22:27 PM9/10/08
to js...@googlegroups.com
Hi ,

I did that with Open SMPP, but optional parameter fails on open smpp also.

Regards,

uud ashr

unread,
Sep 10, 2008, 10:22:20 PM9/10/08
to js...@googlegroups.com
Hi, 

Could you tell me how did you do that on Open SMPP, so people here know how, and I can tell you how to do the same thing on JSMPP.

Thanks, 
uudashr

Imran Raza Khan

unread,
Sep 10, 2008, 11:52:15 PM9/10/08
to js...@googlegroups.com
Hi,

Please find below response

1st octet: <length_of_user_data_header> - This is set to 05 for concatenated short messages. Length does not include itself in its count.

2nd octet: <information_element_identifier> - This is set to 00 for concatenated short messages.

3rd octet: <length_of_information_element> - This is set to 03 for concatenated short messages. Length does not include itself in its count.

4th to 6th octet: <information_element_data> - 3 octets for concatenated short message.

4th octet: <concatenated_short_message_reference_number> - Modulo 265 counter. This reference number remains constant for every short message in the concatenated short message.

5th octet: <max_number_of_short_messages_in_the_concatenated_short_message> - This is usually set to 02 or 03 depending on how many short messages are in the concatenated short message.

6th octet: <sequence_number_of_the_current_short_message> - The value is set to 01 for the first message and increments by one for every short message with in the concatenated short message.

Example 1 - 180 character message.

"This is an example of a text message that has more than 160 characters and has been split into two short messages and sent as a concatenated short message with a 6 byte udhi header"

Each message can only contain 153 7-bit characters, because 6 bytes of the 140 byte user data is used for the header. So you will have one 153 character message plus header and the second is 27 character message plus header.

First Message:

0500030502015468697320697320616e206578616d706c65206f6620612074657874206d657373616765207468617420686173206d6f7265207468616e20313630206368617261637465727320616e6420686173206265656e2073706c697420696e746f2074776f2073686f7274206d6573736167657320616e642073656e74206173206120636f6e636174


Second Message:

050003050202652077697468206120362062797465207564686920686561646572


I set esm_class to 64 and data_coding to 0.

Regards,
imran

esh...@gmail.com

unread,
Sep 21, 2008, 6:00:07 AM9/21/08
to jsmpp
Hi,
No LONG SMS message is received when SMS sent with the
'SubmitLongMessageExample' in jSMPP, instead corrupt message is
received.what can the problem be?.Can you figure it out and provide a
solution.Can jSMPP used to send a SMS of 600-1000 characters long..If
so give an example in this regard.I would appreciate if it can be...

regards,
Esh
> 5468697320697320616e206578616d706c65206f6620612074657874206d657373616765207­468617420686173206d6f7265207468616e20313630206368617261637465727320616e6420­686173206265656e2073706c697420696e746f2074776f2073686f7274206d6573736167657­320616e642073656e74206173206120636f6e636174
>
> Second Message:
>
> 050003050202652077697468206120362062797465207564686920686561646572
>
> I set esm_class to 64 and data_coding to 0.
>
> Regards,
> imran
>
>
>
>
>
>
>
> On Thu, Sep 11, 2008 at 8:22 AM, uud ashr <uuda...@gmail.com> wrote:
> > Hi,
> > Could you tell me how did you do that on Open SMPP, so people here know
> how,
> > and I can tell you how to do the same thing on JSMPP.
>
> > Thanks,
> > uudashr
> > On Thu, Sep 11, 2008 at 12:22 AM, Imran Raza Khan <imranrazak...@gmail.com
>
> > wrote:
>
> >> Hi ,
>
> >> I did that with Open SMPP, but optional parameter fails on open smpp
> also.
>
> >> Regards,
>
> >> On Wed, Sep 10, 2008 at 10:36 PM, uud ashr <uuda...@gmail.com> wrote:
> >> > Can you tell me how did you do that?
> >> > AFAIK the UDHI works if you compose the short_message that contains
> user
> >> > header.
>
> >> > On Wed, Sep 10, 2008 at 10:48 PM, Imran Raza Khan
> >> > <imranrazak...@gmail.com>
> >> > wrote:
>
> >> >> hi,
>
> >> >> I am successful in sending long message by setting UDH. but i thing
> >> >> setting optional parameter dont work.
> >> >> SAR_MSG_REF_NUM
> >> >> SAR_SEGMENT_SEQNUM
> >> >> SAR_SEGMENT_SEQNUM
>
> >> >> Regards
>
> >> >> On Wed, Sep 10, 2008 at 9:41 PM, uud ashr <uuda...@gmail.com> wrote:
> >> >> > Did you have any messsage id returned from
> >> >> > SMPPSession#submitShortMessage(...) ?
> >> >> > I didn't find any message id from submit_sm_resp on the ethereal
> >> >> > trace,
> >> >> > but
> >> >> > the strange is the command_status is 0 (it should be succeed).
>
> >> >> > It would be better if you ask the SMSC vendor about this case (about
> >> >> > how
> >> >> > to
> >> >> > send long SMS).
> >> >> > On Tue, Sep 9, 2008 at 3:53 PM, Imran Raza Khan
> >> >> > <imranrazak...@gmail.com>
> >> >> > wrote:
>
> >> >> >> Hi,
>
> >> >> >> I tried example to send long message but i never receive on my
> >> >> >> mobile.
>
> >> >> >> Please find attached ethereal trace.
>
> >> >> >> Regards,
> >> >> >> imran
>
> >> >> >> On Mon, Sep 8, 2008 at 3:49 PM, uud ashr <uuda...@gmail.com> wrote:
> >> >> >> > Basically you can use subversion client to checkout the source
> >> >> >> > code
> >> >> >> > directly
> >> >> >> > from subversion repositories (server). So when there is some
> patch
> >> >> >> > or
> >> >> >> > changes made to the source code, you can get it ASAP.
> >> >> >> >http://code.google.com/p/jsmpp/source/checkout
> >> >> >> > I also attach the source distribution.
> >> >> >> > Regards,
> >> >> >> > uudashr
>
> >> >> >> > On Mon, Sep 8, 2008 at 4:23 PM, Imran Raza Khan
> >> >> >> > <imranrazak...@gmail.com>
> >> >> >> > wrote:
>
> >> >> >> >> Hi,
>
> >> >> >> >> Sorry i couldnt get you, can i access that example or not?
>
> >> >> >> >> Regards,
>
> >> >> >> >> On Mon, Sep 8, 2008 at 2:30 PM, uud ashr <uuda...@gmail.com>
> >> >> >> >> wrote:
> >> >> >> >> > Sorry, its still on the subversion repo.
>
> >> >> >> >> > On Mon, Sep 8, 2008 at 3:02 PM, imranrazakhan
> >> >> >> >> > <imranrazak...@gmail.com>
> Warid Telecom, Lahore.- Hide quoted text -
>
> - Show quoted text -

esh...@gmail.com

unread,
Sep 26, 2008, 10:02:33 AM9/26/08
to jsmpp
Hi,
I found the bug where it rises from regarding LONG SMS. It is due
to wrong method call in OptionalParameters.java in bean package.

In,
public static OptionalParameter.Byte newSarTotalSegments(int value)
{
return newSarSegmentSeqnum((byte)value);
}

'newSarTotalSegments' should be replaced instead of
'newSarSegmentSeqnum'


public static OptionalParameter.Byte newSarTotalSegments(int value)
{
return newSarTotalSegments((byte)value);
}

Long SMS works fine in jSMPP. Good Luck to the author -Nuruddin Ashr
uudashr..


regards,
Esh
Reply all
Reply to author
Forward
0 new messages