How to send a long SMS message

1,425 views
Skip to first unread message

do tuan anh

unread,
May 2, 2012, 3:48:16 AM5/2/12
to mobicent...@googlegroups.com
Dear all,
I dont know how to send a long SMS message( above 140 characters) from my app( SMSC) to MSC. Anyone do this please show me the steps
When I set moreMessageToSend = true in SmsDeliverTpdu but it doesn't work, i think i have to do other steps
And when I create SmsDeliverTpdu with above 101 characters in user Date, I received REJECT component from MSC with reason: mistypedParameter. I dont know why???
Many thanks for your help

do tuan anh

unread,
May 2, 2012, 7:14:37 AM5/2/12
to mobicent...@googlegroups.com
Anyone faces to this problem???

Vào 14:48:16 UTC+7 Thứ tư, ngày 02 tháng năm năm 2012, do tuan anh đã viết:

Sergey Vetyutnev

unread,
May 2, 2012, 11:58:26 AM5/2/12
to mobicents-public
Hello!

You can find the information of how to create contatenated SMS in the
3GPP TS 23.040 - 9.2.3.24.1 Concatenated Short Messages

Shortly you need to split a message into several short messages and
subsequently send all of them.
- If all your charachters are GSM 7 bit default alphabet data, you
should split a message String into parts with 153 charachters length
(for 8-bit reference number) or 151 charachters length (for 16-bit
reference number). If not all your charachters are GSM 7 bit default
alphabet data the task of splitting data is more complicated.
- each part must have ConcatenatedShortMessagesIdentifier:
- ConcatenatedShortMessagesIdentifier idt = new
ConcatenatedShortMessagesIdentifierImpl(...);
- UserDataHeader hdr = new UserDataHeaderImpl();
- hdr.addInformationElement(idt);
- each of part must be encoded into a separate UserDataImpl and when
creating UserDataImpl you should add UserDataHeader as 3-rd parameter.

do tuan anh

unread,
May 3, 2012, 4:50:55 AM5/3/12
to mobicent...@googlegroups.com
Great,
I did as you advice and it works very well now, I can send many part of SMS to end user.
Do you have any idea about my second question: "when I create SmsDeliverTpdu with above 101 characters in userData, I received REJECT component from MSC with reason: mistypedParameter. I dont know why???"( In this case I set moreMessageToSend = false because I test with 102 characters). It's OK when I create SMS below 101 characters with the same way

Thank you so much my big friends

Vào 22:58:26 UTC+7 Thứ tư, ngày 02 tháng năm năm 2012, Sergey Vetyutnev đã viết:

Sergey Vetyutnev

unread,
May 3, 2012, 1:01:06 PM5/3/12
to mobicents-public
Hello!

> "when I create
> SmsDeliverTpdu with above 101 characters in userData, I received REJECT
> component from MSC with reason: mistypedParameter. I dont know why???"( In
> this case I set moreMessageToSend = false because I test with 102
> characters). It's OK when I create SMS below 101 characters with the same
> way
I do not know why too.
Can you supply me with the trace data?

do tuan anh

unread,
May 3, 2012, 8:37:24 PM5/3/12
to mobicent...@googlegroups.com
Dear Sergey,
This is my trace data( No 120, 122, 123)
Can you see anything wrong in this capture file
Thank you very much

Vào 00:01:06 UTC+7 Thứ sáu, ngày 04 tháng năm năm 2012, Sergey Vetyutnev đã viết:
capture.rar

Sergey Vetyutnev

unread,
May 6, 2012, 4:50:30 PM5/6/12
to mobicents-public
Hello!

I have not found anything bad in traces.
In which message characters count "mistypedParameter" occurs?
All values from 102 to 140 or only when 102 characters?
>  capture.rar
> 18KПросмотретьЗагрузить

do tuan anh

unread,
May 6, 2012, 8:31:57 PM5/6/12
to mobicent...@googlegroups.com
Dear Sergey
When I set 102 to 140 characters, "mistypedParameter" will occur.I don't know why :(

Vào 03:50:30 UTC+7 Thứ hai, ngày 07 tháng năm năm 2012, Sergey Vetyutnev đã viết:

Sergey Vetyutnev

unread,
May 7, 2012, 1:41:41 AM5/7/12
to mobicents-public
Hello!

Try to use "empty begin" segmentation for long messages:
- send TC-BEGIN without MT-ForwardSM
- wait for TC-CONTINUE from MSC
- send MT-ForwardSM


C.2 TCAP segmentation:
At the TCAP level the following segmentation mechanisms are available:
C.2.1 Empty Begin
In a dialogue with AC version >1 the first forward message (Begin)
must contain a Dialogue Portion. Instead of sending the Dialogue
Portion and the Component Portion in the first forward message, an
empty Begin (i.e. without a Component Portion) is sent, followed
(after successful dialogue establishment) by a Continue message which
can carry a longer Component Portion since no Dialogue Portion is
present in the second forward message.

Amit Bhayani

unread,
Jun 11, 2012, 4:49:20 PM6/11/12
to tuan anh do, mobicents-public
Hi,

We can definitely provide details on SMSC GW, any contribution is welcome. Please join SS7 weekly chat @ IRC http://webchat.freenode.net/ (channel mobicents) at UTC 12:00 and we can discuss more about SMSC GW.

Thanks and Regards,
Amit.

On Mon, Jun 11, 2012 at 2:39 AM, tuan anh do <anh...@gmail.com> wrote:
Dear sir Amit,
I'm very interested in your smsc project since you suggest. It is really great for our intention and it will be greater if i can find some document which describe about it, can you show me. Ex: you posted: http://code.google.com/p/smscgateway/issues/detail?id=1&colspec=ID%20Type%20Status%20Priority%20Version%20Owner%20Summary
but i cannot find any thing about smsc project design.
Can you show me or provide some guide.
Thank you so much


On Wed, May 2, 2012 at 3:32 PM, tuan anh do <anh...@gmail.com> wrote:
Dear Amit,
Thank you. It's true that I'm trying to develop a SMSC, but in this period I'm research your open source and other knowledge in telecom. That's why i have asked many simple questions.
I will research smscgateway project and I hope that I can contribute something to this project
Thanks and Best Regards,


On Wed, May 2, 2012 at 3:02 PM, Amit Bhayani <amit.b...@gmail.com> wrote:
Dear Do Tuan, 

Can you please give more details about application that you are trying to develop?
It looks like you are trying to make SMSC, if thats true, did you see the SMSC Project from mobicents http://code.google.com/p/smscgateway/ ?

It will be great benefit to all if we combine the efforts.

Amit.

LU

unread,
Jun 21, 2013, 8:34:34 AM6/21/13
to mobicent...@googlegroups.com, tuan anh do

Dear,

I got the same pb during my tests, Some operator's MSC do not reject the SMS even with 160characters, but some operator's MSC rejects the SMS when it is more than 104 characters.
Even if I send an empty TCAP BEGIN first and then SMS Deliver in a TCAP CONTINUE, I got the same result: the MSC rejects the SMS when it has more than 104 characters.

And no différence whether we send in MAP V3 or MAP V2. The Reject Component is always:
Component: reject (4)
   reject
          invokeIDRej: derivable (0)
               derivable: 1
          problem: invokeProblem (1)
                invokeProblem: mistypedParameter (2)


And idea on this?

Thanks

 

tuan anh do

unread,
Jun 22, 2013, 12:19:13 AM6/22/13
to LU, mobicent...@googlegroups.com
Hi Lu, there's a bug in asn project cause this problem. I don't remember exactly now, i will make it clear on next Monday if you still cannot resolve this problem

Sergey Vetyutnev

unread,
Jun 22, 2013, 6:36:34 AM6/22/13
to mobicent...@googlegroups.com, tuan anh do
Hello!

>  I got the same result: the MSC rejects the SMS when it has more than 104 characters.
Can you please supply any trace to see details?

Fernando Mendioroz

unread,
Jun 22, 2013, 7:00:29 AM6/22/13
to mobicent...@googlegroups.com, tuan anh do

Attached with this email you have an example.

 

This is a very one of a kind case of long SMS, as the destination entity of the MAP SRI was not the HLR, but an Ericsson entity called FNR. The distinction is that instead of sending the Global Title of the HLR in the destination address, we had to put the destination MSISDN instead. The FNR deduced the HLR destination to which the MSISDN belonged.

 

MAP Forward_SM is later sent in normal manner to the MSC/VLR in the necessary two steps as the SMS payload was bigger than 104 characters long.

 

Well … the trace tells better J

 

Hope it helps and best regards!

Fernando

--
You received this message because you are subscribed to the Google Groups "mobicents-public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobicents-publ...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

longSMS_OK_msisdn50245485571.cap

Sergey Vetyutnev

unread,
Jun 22, 2013, 10:24:49 AM6/22/13
to mobicent...@googlegroups.com, tuan anh do
Hello!

Sorry, I asked for a trace with a reject...

To unsubscribe from this group and stop receiving emails from it, send an email to mobicents-public+unsubscribe@googlegroups.com.

tuan anh do

unread,
Jun 24, 2013, 12:06:01 AM6/24/13
to Hongwu LU, mobicent...@googlegroups.com
I corrected it in jss7 Beta2.0. You will check it for your version
In ASN Project
public void writeLength(int v) throws IOException {

if (v == Tag.Indefinite_Length) {

this.write(0x80);
return;
} else if (v > 0x7F) {

int posLen = this.pos;
// this.write(0); ---> Comment out this
int count = this.writeIntegerData(v);
this.buffer[posLen] = (byte) (count | 0x80);
} else { // short

this.write(v);
}
}

public int writeIntegerData(long v) throws IOException {

// if its positive, we need trailing 0x00
boolean wasPositive = v > 0;
long v1 = v;
if (!wasPositive) {
v1 = -v;
}
// determine how much we should write :)

int count = 0;
if((v1 & 0xFF00000000000000L) != 0 ) {
count = 8;
} else if ((v1 & 0xFF000000000000L) != 0 ) {
count = 7;
} else if ((v1 & 0xFF0000000000L) != 0 ) {
count = 6;
} else if ((v1 & 0xFF00000000L) != 0 ) {
count = 5;
} else if ((v1 & 0xFF000000L) != 0 ) {
count = 4;
} else if ((v1 & 0xFF0000L) != 0 ) {
count = 3;
} else if ((v1 & 0xFF00L) != 0 ) {
count = 2;
} else {
count = 1;
}

ByteBuffer bb = ByteBuffer.allocate(8);
bb.putLong(v);
byte[] dataToWrite = new byte[8];
bb.flip();
bb.get(dataToWrite, 0, 8);

int extraCount = 0;
if (wasPositive && (dataToWrite[8 - count] & 0x80) != 0) {
this.write(0);
// extraCount = 1; --> Comment out here
}
this.write(dataToWrite, 8 - count, count);

return count + extraCount;
}

When you fix this, out message of more 128 byte will be created correctly.

Hongwu LU

unread,
Jun 24, 2013, 2:55:17 AM6/24/13
to tuan anh do, mobicent...@googlegroups.com
Thanks tuan
I will check it on my side and keep you updated ASAP.
Just one thing I am a little confused, you said that it is from 128 characters but my tests shows that the Msc starts rejecting from 105 , I am wondering where comes the difference?

Mail End Here

tuan anh do

unread,
Jun 24, 2013, 4:08:46 AM6/24/13
to Hongwu LU, mobicent...@googlegroups.com
You need to check this document : T-REC-Q.773-199706-I!!PDF-E.pdf
Part: 4.1.2.3 Length of the Contents

LU

unread,
Jun 24, 2013, 12:21:18 PM6/24/13
to mobicent...@googlegroups.com, Hongwu LU

@tuan, thank you very much, tested and validated, your patch works very well, great!

@sergey, please check tuan's answer, he has figured out a bug in ASN project and has corrected, hope that it will be applied in the coming release.

thanks you guys!


LU


Sergey Vetyutnev

unread,
Jun 24, 2013, 5:58:39 PM6/24/13
to mobicent...@googlegroups.com, Hongwu LU
Hello!

OK, this is a bug of ASN library - writeLength() method adds extra zero bytes into a "long style length".
This is an issue for this case, I am committed an update.

Please test this.

Special thanks do tuan anh for a clarification which part of ASN contains a bug.

Amit Bhayani

unread,
Jun 25, 2013, 4:14:34 AM6/25/13
to mobicents-public, Hongwu LU
Dear Tuan Anh Do,

Thanks a lot for identifying and providing this fix. We have added your name to "Acknowledgements" http://www.telestax.com/opensource/acknowledgments/

Cheers
Mobicents jSS7 Team


--
You received this message because you are subscribed to the Google Groups "mobicents-public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobicents-publ...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages