Using NowSMS as an SMPP Server for Another Application - only 70 ch...

Using NowSMS as an SMPP Server for Another Application - only 70 ch... SearchSearch
Author Message
Øystein Gåsdal
New member
Username: Dal

Post Number: 3
Registered: 04-2008
Posted on Thursday, August 26, 2010 - 10:01 am:   

Hi again.
I have set up NowSMS as a SMPP Server for one of our applicatons called SecurEnvoy.
SecurEnvoy is a program that provides 2 factor authentication to our VPN solution by sending a SMS to the user with a code.

SecurEnvoy uses a text file called smspasscode.txt where you can enter the text that is actually sent out to the users.
I have kept the text in this file below 160 characters to avoid using more than 1 SMS per message.

But now, when using NowSMS as gateway, it is possible to see how many SMS it actually uses per message. And it is 3 SMS per message!

How can this be when the string is below 160 characters?

I did some more testing and found out that the string in smspasscode.txt cannot exeed 70 chars. One more character, and it sends the message using 2 SMS.

That of course is a bad thing, and it also gets slower when using more than one SMS per message.

I sent this finding to SecurEnvoy support, and here is their answer:

Well I’ve spoken to development who say that the spec for SMPP specifies that it’s a max of 160 octet bytes (ie 8-bit bytes) and so that is what we use (ie 8-bit extended ascii).
So we think the NowSMS server is converting the string from us to 16-bit Unicode before sending to the modem (ie doubling the number of bytes).
Is it possibly to enable some debugging on the NowSMS to see what it is sending to the modem? Or to check the configuration options for an encoding option?
Øystein Gåsdal
New member
Username: Dal

Post Number: 4
Registered: 04-2008
Posted on Thursday, August 26, 2010 - 10:09 am:   

Arh, I didn't find out how to edit a post, so I'll finish the post here:

Can you think of a reason why I can use only 70 characters?

I'm uploading the smspasscode.txt if you want to see it for yourselves.

Thank you.

text/plainsmspasscode
smspasscode.txt (0.1 k)
text/plainsmspasscode_desired
smspasscode_desired.txt (0.2 k)
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2466
Registered: 08-2008
Posted on Thursday, August 26, 2010 - 08:45 pm:   

Hi,

If you use any characters that are outside of the GSM character set, then NowSMS has to send the message in Unicode format, which has a 70 Unicode character limit.

I don't see any strange characters in either of the files that you have posted. So it is not clear to me why this would be happening.

The easiest way to figure this out is to enable the SMSDEBUG.LOG. Submit another message, and then reply with the SMSDEBUG.LOG and SMPPDEBUG.LOG files that get generated. That will show us what is actually being submitted and how it is being submitted.

--
Des
NowSMS Support
Øystein Gåsdal
New member
Username: Dal

Post Number: 5
Registered: 04-2008
Posted on Thursday, August 26, 2010 - 10:01 pm:   

Hello, and thank you for answering.
Here are the files you asked for.

Thanks.
application/octet-streamSMSDEBUG.LOG
SMSDEBUG.LOG (2.6 k)

application/octet-streamSMPPDEBUG.LOG
SMPPDEBUG.LOG (3.3 k)
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2469
Registered: 08-2008
Posted on Thursday, August 26, 2010 - 10:45 pm:   

Hmm...

The SMPP application is submitting the message to us in 16-bit Unicode format. You can see the raw SMPP packet in the SMPPDEBUG.LOG, and with all of the "00" entries, it's clear that they are sending using 16-bit Unicode characters.

If an SMPP application does that, we don't do any transcoding of the message, we send it out in that format.

If a Unicode message is longer than 70 characters, we have to segment it in order to deliver it. (The SMS size limit is 140 8-bit bytes, or 70 16-bit Unicode characters. You get 160 characters for standard GSM text because a 7-bit character set is used instead of 8-bit, leaving 140 unused bits, which allows 20 extra characters to be squeezed in.)

So I don't think the answer you got from the other vendor is correct. They are submitting using 16-bit Unicode, not 8-bit bytes. (160 characters using 8-bit bytes would be fine via SMPP, NowSMS does the 7-bit encoding.)

If you don't get anywhere with the vendor, I could help you kludge a solution. The message would come in to NowSMS via SMPP, then we'd do a loopback connection to post it back to ourselves via HTTP where we could do some transcoding, and then route it out the modem.

It'd be a complex and unusual configuration. But before I suggest that, I'd suggest going back to the vendor again ... they should realize that they are submitting using 16-bit Unicode, and maybe they have a configuration parameter to change this, because I'm sure it causes problems for others as well.

Please feel free to share the SMPPDEBUG.LOG with them, as that should help clarify to their support people that the are indeed using 16-bit Unicode.

--
Des
NowSMS Support
Øystein Gåsdal
New member
Username: Dal

Post Number: 6
Registered: 04-2008
Posted on Friday, August 27, 2010 - 07:49 am:   

Thank you for your information.
I will relay this forum post to them.

Thanks again.