Dynamically routing to 2-WAY application

Dynamically routing to 2-WAY application SearchSearch
Author Message
Joseph Smith
New member
Username: Falangjoe

Post Number: 21
Registered: 08-2006
Posted on Thursday, July 22, 2010 - 10:46 pm:   

Union Telephone : v2009.06.11

Is is possible to use the SMSAccountingURL to dynamically route to a 2-WAY application? I thought that I had seen how to do this somewhere, but I can't find it anymore.

SMSAccountingURL=http://server.name/path
RouteName = ?


Thanks,
Joseph
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2355
Registered: 08-2008
Posted on Friday, July 23, 2010 - 06:37 pm:   

Hi Joseph,

I don't think that's possible.

The accounting callback can control the outbound route of the message, but it can't convert it to an inbound message.

However, I've been giving this some thought, and there is a kludgey way that you could accomplish similar functionality.

Instead of defining a 2-way command, create a new HTTP SMSC definition. The URL template for an HTTP SMSC is a little different than a 2-way command, but it is similar in many ways, so review the docs.

Make sure that "Support any outbound message traffic" is NOT checked for this HTTP SMSC connection, otherwise NowSMS may try to route regular traffic via this connection.

For simplicity, add a RouteName= parameter for this HTTP SMSC connection (see http://blog.nowsms.com/2008/07/routing-sms-messages-to-specifc-smsc.html).

In your SMS accounting callback, return a response of RouteName=xxxx when you want this message to be routed via the fake HTTP SMSC connection.

Note that unlike with a 2-way command, an HTTP SMSC request cannot return a direct text reply. (However, the script could generate a new HTTP connection to send a message if it wanted to.)

It's (more than) a little confusing, but this might be workable for your scenario.

--
Des
NowSMS Support