Routing SMS

Routing SMS SearchSearch
Author Message
Brice
New member
Username: Dbrice

Post Number: 1
Registered: 06-2004
Posted on Tuesday, June 22, 2004 - 04:44 pm:   

Hi,
I want to perform routing message between operators. I have 3 operators (3 SIM cards and 3 GSM MODEM), and I want to send message from A to B, form A to C, from B To C, etc. I don't know how to perform it.
Please help me
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 2877
Registered: 10-2002
Posted on Tuesday, June 22, 2004 - 07:28 pm:   

Do you have a way of identifying which phone numbers should be routed to which operator?

That would be the first requirement.

Hopefully the phone numbers that belong to each operator start with certain prefixes?

For example, phone numbers on operator A start with 0111, operator B with 0112, operator C with 0113.

If so, then you can define these prefixes in the "Routing" box associated with each modem definition under the "SMSC" list in NowSMS. Highlight the modem entry in the "SMSC" list, and press "Properties". In the "Routing" box, add in the "Preferred SMSC Connection" list, the appropriate prefix for the operator associated with that modem. For example, enter "0111*" for the modem associated with operator A, which means that all messages addressed to a recipient address that starts with "0111" would get routed to this modem only. (It is also a good idea to define these prefixes for numbers in international format as well, e.g., "+99111*" if the country code were "99".)

After this configuration, if you submit a message to NowSMS, it will get routed to the correct recipient based upon the recipient phone number.

Next, if you wanted to route between operators, that is going to require some scripting work on your part.

What do I mean by scripting?

Well, I am assuming that you want to have a user on operator A be able to send a message to someone on operator B through a service that you provide. NowSMS does not have built in functionality to provide this type of service, but you can add a script to facilitate this type of service.

When a user wants to send such a message, they would have to send an SMS message to your server, and they would have to indicate the phone number that they want to send the message to in the text of the message.

From the perspective of NowSMS, when NowSMS receives an SMS message, it executes a command from the "2-way" command table. This is usually an HTTP script that is running on another web server. We pass that script details about the received message, such as the text of the message, and the sender of the message.

Your script would validate that the message sender is authorised to send through your gateway. And your script would then parse the text of the received message to determine what phone number the user is requesting to send the message to. Your script would then submit a request back to NowSMS to send a new message to the intended recipient.

The following links talk about developing "2-way" scripts:

http://www.nowsms.com/documentation/ProductDocumentation/2_way_sms_support.htm
http://www.nowsms.com/support/bulletins/tb-nowsms-003.htm

And the following thread on our discussion board has links to some practical examples of 2-way scripts written in PHP:

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

Dandjinou
New member
Username: Dbrice

Post Number: 2
Registered: 06-2004
Posted on Wednesday, June 23, 2004 - 05:42 pm:   

Hi,
Thanks a lot for your reply. But I have a big problem sending sms with php script. When I send emphasis caracter like é,ç,è,à,etc. the recepient get strange caracter. Please, what can i do to allow my system sending caracters like énè,à,ä,ë, etc?
Thanks in advance !
bd
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 2905
Registered: 10-2002
Posted on Friday, June 25, 2004 - 04:37 pm:   

Hi bd,

NowSMS expects text to be submitted in UTF-8 format.

If you're using PHP, and your text is standard Latin characters (like é,ç,è,à), pass the text to the utf8_encode function.

http://us3.php.net/manual/en/function.utf8-encode.php

It is also possible to pass the character set to NowSMS in a URL request (but not in a direct 2-way response) ... by including the parameter "&charset=iso-8859-1" in the URL request.

NowSMS will always recognise the following character set names in that parameter: iso-8859-1, us-ascii, big5, big-5, gbk, gb2312, gb2312-80, shift-jis, shift_jis, iso-8859-2, iso-8859-4, iso-8859-5, iso-8859-6, iso-8859-7, iso-8859-8, iso-8859-9. But depending on the Windows configuration, other character sets may also be supported.

-bn
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 2906
Registered: 10-2002
Posted on Friday, June 25, 2004 - 04:41 pm:   

P.S. - There is another issue that you should be aware of when sending some of these characters.

Most of the commonly used accented Latin characters are included in the standard GSM character set. But some less commonly used variations are not.

If a message includes any characters that are not part of the standard GSM character set, then the entire message must be sent out in Unicode format.

When a message is sent out in Unicode format, there are only 70 characters available per SMS message (as opposed to 160 characters when a message only uses the standard GSM character set).

The following link includes a table that shows which characters are part of the standard GSM character set:

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

The NowSMS web interface "Send Text Message" form will also display a counter that shows you how many characters have been used, and how many are available.

-bn