Modifying SMS OA received via SMPP and then re-route ......

Modifying SMS OA received via SMPP and then re-route ...... SearchSearch

SMS & MMS Technical Forum » NowSMS Support - SMS Issues (Product Support Only) » Archive through May 20, 2013 » Modifying SMS OA received via SMPP and then re-route ...... « Previous || Next »
Author Message
Nelson Lam
New member
Username: Nelsonlam

Post Number: 1
Registered: 02-2013
Posted on Tuesday, February 19, 2013 - 06:06 am:   

Dear Support Team

Currently our NowSMS servers are connecting with Local Mobile Operator's SMSC via SMPP connections to route SMS back and forth.

We would like to enquire NowSMS aboutc hanging/modifying the SMS OA field as follows:
- on the same NowSMS server we will have 2 or more SMPP connections (says: Op1, Op2, Op3)
- after we received the SMS from Op1's SMSC via SMPP, we would like to change the OA (sender address or "sender phone number") to another different value (e.g. change OA from +44712345678 to +33643241321)
- after changing the OA field of the SMS, we will then route the SMS (with modified OA) to Op2 or Op3.

Pls let us know if NowSMS can support the above OA modification.

Thanks.
Nelson
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4296
Registered: 08-2008
Posted on Tuesday, February 19, 2013 - 04:30 pm:   

Hi Nelson,

Yes, this is possible.

You will need to implement accounting callbacks to apply changes to any origination or destination addresses (and to specify routing).

(If your OA modifications are pattern based, such as adding or removing country codes, it is also possible to configure them directly in NowSMS: http://www.nowsms.com/international-prefix-conversion-for-sms. I am assuming your scenario is not pattern based.)

First Issue: Routing messages received from one SMSC connection to be sent to another SMSC connection.

Assuming that NowSMS is initiating all of the SMPP connections, the first issue is that needs to be addressed is that NowSMS categorises messages as "inbound" or "outbound" and handles them differently.

"Inbound" messages are expected to be routed to either a 2-way command or an SMPP client ("SMS Users" account).

"Outbound" messages are routed to an upstream SMSC connection ("SMSC" account).

If NowSMS receives a message from an SMSC account, it is considered an inbound message.

If you want to route those received messages to another SMSC account, you must apply a configuration parameter. Under the [SMPP - server:port] section of SMSGW.INI, add ReRouteReceived=any to indicate that received messages from this SMSC should be rerouted as "outbound" messages. (Instead of "any", you can specify a route name for another SMSC connection. I suggest using "any" because you indicated that messages from Op1 might go to Op2 or Op3.)

(You might want to search this forum using a keyword of ReRouteReceived to find other discussions of how this parameter is used.)

Next, the accounting callbacks come into play. They are how you can tell NowSMS which SMSC connection to use for routing the message, and to change OA or DA.

Accounting callbacks are described here:

http://www.nowsms.com/understanding-sms-accounting-callbacks

Basically you are looking at the SMSSend PreAuth and Accounting callbacks.

Each time NowSMS receives a message to be routed, the first thing that happens is the SMSSend PreAuth callback. This is an HTTP callback to a URL you have specified. The URL request contains details about the message, and your response tells NowSMS how to route the message. (Example, return SMSCRoute=Op2 in the text of the response to indicate that the message should be routed to Op2.)

These accounting callbacks can also be used to modify OA and DA.

SMSAccountingAllowChanges=Yes must be added to the [SMSGW] section of SMSGW.INI to enable this support.

When this setting is present, NowSMS will parse the HTTP response for "SMSSend" Accounting and PreAuth accounting callbacks looking for "To=", "Sender=", "ServiceType=", "Validity=" and "SMPPOption_xxxx=" settings. If any of these text strings are present, the value that follows will be used to replace the existing value. (In the case of SMPPOption_xxxx=, a blank value will completely remove the parameter.) It is recommended that the HTTP response terminate the value with a new line to act as an end of value string delimiter.

This is a lot of info to convey, so if I can clarify anything further, please do not hesitate to ask.


--
Des
NowSMS Support

Login Login / Register Logout Logout Search Last 30 Days Topics Topics