Unicode on USSD

Unicode on USSD SearchSearch
Author Message
Naser Gharachi
New member
Username: Gharachi

Post Number: 3
Registered: 06-2009
Posted on Wednesday, June 23, 2010 - 06:26 am:   

Hi,

I use NowSMS for both SMS and USSD.My NowSMS works properly when I use Unicode to send SMS but it dos not work in USSD. The following lines show the log for using Unicode in SMS and USSD. The first is successful and the next has been rejected by USSD server though the server supports Unicode.


SMS>>>>2010-06-22 19:11:45,4A7429C4.req,127.0.0.1,+989340000000,OK -- SMPP - 192.168.0.2:2775,Sender=Naser;SMSCMsgId=6010b4c2180308c0;DCS=8;Text="81 00000 0 تست"

USSD>>>2010-06-22 18:39:58,4A7429B7.req,127.0.0.1,+989340000000,OK -- SMPP - 192.168.0.2:2775,SMSCMsgId=6010f3e09b030842;DCS=8;Text="81 00000 0 تست"

Thank you,
Naser
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2267
Registered: 08-2008
Posted on Wednesday, June 23, 2010 - 07:55 pm:   

Hi Naser,

It appears that you are using the same SMSC connection for both SMS and USSD.

Is it possible to make multiple connections to the SMSC to separate the SMS and USSD usage?

Why I suggest this is because I believe USSD wants to see a DCS value of 0x48 instead of 0x08 for Unicode messages.

There was some discussion of this here:

http://support.nowsms.com/discus/messages/1/33302.html

And we did an update last year that allowed you to specify a default Unicode DCS value for an SMPP connection, specifically to address Unicode for USSD.

--
Des
NowSMS Support
Naser Gharachi
New member
Username: Gharachi

Post Number: 4
Registered: 06-2009
Posted on Thursday, June 24, 2010 - 08:27 am:   

Hi Des,

I have separated connection and servers for SMS and USSD over SMPP. In the bellow you can see 3 lines, the first is a successful normal message but for two others I have used Unicode:

1. 2010-06-24 10:53:14,4A742AED.req,127.0.0.1,989340000000,OK -- SMPP - 192.168.0.2:2775,SMSCMsgId=6010f35ed00388c4;Text="81 34500 0 test"
2. 2010-06-24 10:53:31,4A742AEF.req,127.0.0.1,989340000000,OK -- SMPP - 192.168.0.2:2775,SMSCMsgId=6010f35e15038805;DCS=8;Text="81 34508 0 تست"
3. 2010-06-24 10:54:38,4A742AF3.req,127.0.0.1,989340000000,OK -- SMPP - 192.168.0.2:2775,SMSCMsgId=6010f36ed5038885;DCS=48;Text="81 34527 0 تست"


The following lines have been sent by my operator to me. Each USSD command must be included 81 and DLG_ID as two important parameters. As you see, NowSMS has changed the parameters to hexadecimal, therefore the provider is not able to understand what I send to it:

1. 6 1278031 192.168.0.2 +0 +0 +0 0 0 +989340000000 +0:SMPP;USSD_TKC_272;6010f35ed00388c4 01604260021500 0 0 0 2 0 9280 0 0 81 34500 0 test
05196 20100624_062051_166660
2. 6 1343567 192.168.0.2 +0 +0 +0 0 0 +989340000000 +0:SMPP;USSD_TKC_272;6010f35e15038805 01604260128000 0 0 0 2 0 9280 0 25 00380031002000330034003500300038002000300020062A0633062A
05196 20100624_062108_433474
3. 6 1474639 192.168.0.2 +0 +0 +0 0 0 +989340000000 +0:SMPP;USSD_TKC_272;6010f36ed5038885 01604260225100 0 0 0 2 0 9280 0 72 00380031002000330034003500320037002000300020062A0633062A
05196 20100624_062215_465884


0038 0031 0020 0033 0034 0035 0032 0037 0020 0030 0020 062A 0633 062A =81 34527 0 تست



My NowSMS version is V2009.07.09. For more information, you can see the URL that I use to send command to operator:

http://127.0.0.1:8800/Send%20Text%20Message.htm?PhoneNumber=%2B989340000000&Text =81+33339+0+%D8%AA%D8%B3%D8%AA&InfoCharCounter=&PID=&DCS=8&Binary=Yes&DestPort=& DelayUntil=&Submit=Submit

Best regards,
Naser
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2270
Registered: 08-2008
Posted on Thursday, June 24, 2010 - 10:47 pm:   

Hi Naser,

Hmm...

This "81 33339 0" code is technically part of the message data, not the header. So if the message text is encoded in Unicode format (as indicated by the DCS), then this code needs to be encoded as Unicode text in the message data.

If you are looking at a hex dump of a standard text message ...for "81 33339 0" you would see 38 31 20 33 33 33 33 39 20 30. That is just hex representation of the ASCII characters (a different way of looking at the same data).

However, if the text is encoded as Unicode, then as part of the text "81 33339 0" has to become 0038 0031 0020 0033 0033 0033 0033 0039 0020 0030.

I think you need some advice from your USSD provider.

If this code was encoded as some type of header parameter, then I could see encoding it differently. However, since the code is part of the text, it needs to be encoded the same as the text, as the data_coding (DCS) value specifies how the receiving system should interpret the text/data.

I think you need advice from your provider on how this data should be encoded for a Unicode message.

We're not opposed to making changes on our end, but there is still a lot that doesn't make sense.

--
Des
NowSMS Support
Naser Gharachi
New member
Username: Gharachi

Post Number: 5
Registered: 06-2009
Posted on Tuesday, June 29, 2010 - 06:33 am:   

Hi Des,

The problem has been solved by the provider. I send messages without DCS as a normal text, the server decodes hexadecimal to Unicode but NowSms breaks my message when length is more than 160 therefore I can not send maximum allowed Unicode (70) to subscribers.

Regards,
Naser

2010-06-29 09:44:57,SAR-989340000000-4a742f6b-2-1.req,127.0.0.1,989340000000,OK -- SMPP - 192.168.0.2:2775,SMSCMsgId=6010e320db034ac1;UDH=050003650201;Text="72 33541 60 72 0031002E067E0631062F0627062E062A0020064206280636000D000A0032002E0634062706310698 002006A906270631062A0020000D000A0033002E0644063A0648002006" 2010-06-29 09:44:58,SAR-989340000000-4a742f6b-2-2.req,127.0.0.1,989340000000,OK -- SMPP - 192.168.0.2:2775,SMSCMsgId=6010e3201c034a02;UDH=050003650202;Text="390636064806C C062A0020000D000A0034002E062E062F06450627062A002006A906CC06340020"
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2291
Registered: 08-2008
Posted on Tuesday, June 29, 2010 - 05:15 pm:   

Hi Naser,

Ask your provider if they can use the "message_payload" parameter for message text.

Under "Advanced Settings" for the SMPP connection in NowSMS, there is an option for "WDP Adaptation". Enable the "WDP Adaptation" setting. This setting was originally added for a different purpose, but basically if you send a long message, this tells NowSMS not to segment the message, but instead using the SMPP "message_payload" parameter to submit the long message without segmentation. (The NowSMS logs will still show a segmented message, but the actual SMPP submission will not be segmented.)

This would require that your provider be able to support the "message_payload" SMPP TLV parameter. When the "WDP Adaptation" setting is enabled, NowSMS uses the "message_payload" parameter for the message text instead of the "short_message" parameter for any messages that are considered too long to fit in a single SMS.

--
Des
NowSMS Support
Naser Gharachi
New member
Username: Gharachi

Post Number: 6
Registered: 06-2009
Posted on Wednesday, June 30, 2010 - 06:52 am:   

Hi Des,
It works properly. Thank you for support.
BR,
Naser
parag jain
New member
Username: Parag4

Post Number: 1
Registered: 07-2010
Posted on Sunday, July 11, 2010 - 02:32 am:   

ffmvmj