MO Messages via SMPP and 2-way

MO Messages via SMPP and 2-way SearchSearch
Author Message
Chris
Frequent Contributor
Username: Chrisc

Post Number: 56
Registered: 12-2008
Posted on Wednesday, August 03, 2011 - 04:28 pm:   

Hi guys

Is it possible to have NowSMS forward an MO message via 2-way and SMPP?

We this can be done with the accounting callbacks, but from what we can see this will include all MO messages and also MT Receipts, which is not exactly what we're after.

We're already uisng quite a few HTTP mechanisms from NowSMS, but only require the MO messages routing to a specific SMPP user to also log an entry into our platform.

Thanks
Chris
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3377
Registered: 08-2008
Posted on Wednesday, August 03, 2011 - 06:05 pm:   

Hi Chris,

If I understand your question correctly, the answer is No.

Messages are routed either to a 2-way command or to an SMPP client account, but not both.

Accounting callbacks can see all messages, but cannot selectively see only certain messages.

I don't think there's any good answer to this other than selective processing in an accounting callback.

There is one kludge way that comes to mind. I assume that you have an SMPP client account that is defined to receive messages for a particular phone number.

Instead of associating that phone number with the SMPP client account, use it as the "Receive Phone Number" for a 2-way command.

In your 2-way command script, resubmit the message to NowSMS with "LocalUser=accountname" as an additional URL parameter. This tells NowSMS to route the message to a particular user account.

If you're using PHP, the SendSMS function in the script described at http://www.nowsms.com/send-sms-from-php-script-updated supports additional parameters such as this one.

Assuming a simple 2-way command of http://server/2way.php?sender=@@SENDER@@&recip=@@RECIP@@&text=@@FULLSMS@@

You could include the following in that script after you log the message or perform whatever processing is necessary:

SendSMS("127.0.0.1", 8800, "username", "password", $_REQUEST['recip'], $_REQUEST['text'], "Sender=" . $_REQUEST['sender'], "LocalUser=accountname");

"username" and "password" are for an "SMS Users" account that is allowed to submit into your system.

"accountname" is the account that should receive the resubmitted message.


--
Des
NowSMS Support
Dave Baddeley
New member
Username: Davebaddeley

Post Number: 8
Registered: 06-2011
Posted on Thursday, August 04, 2011 - 02:51 pm:   

Des,

You updated NowSMS for us so that reciepts are sent to both the 2-way integration and SMPP users where appropriate; can you apply the same fix to inbounds?

Dave
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3392
Registered: 08-2008
Posted on Friday, August 05, 2011 - 03:42 pm:   

Hi Dave,

Unfortunately I don't think the logic is considerably more complex for this.

Plus it would also be duplicating the functionality of the SMSIN accounting callback.

I'll have engineering evaluate what would be involved. Would you envision this happening for all received messages routed to SMPP user accounts, or only for selected SMPP user accounts?

And if for all SMPP user accounts, why this way and not with the accounting callbacks? Admittedly, I may not be thinking this through, so if you could explain this, it may help convince that the engineering effort is worthwhile.

--
Des
NowSMS Support
Dave Baddeley
New member
Username: Davebaddeley

Post Number: 15
Registered: 06-2011
Posted on Monday, August 08, 2011 - 04:14 pm:   

Des,

Yes it would be good to be able to rely on all inbounds being echoed through the 2-way web interface for these reasons:
1) We currently have a mixture of traffic originating from either SMPP users or from our platform via the 2-way interface. We would like to avoid having to process unnecesary accounting callbacks for the 2-way originated traffic.
2) The 2-way forwarding mechanism is reliable and retries if we do not acknowledge with a HTTP 200-OK whereas the accounting callback is a fire and forget mechanism. At a worst case this could lead to innaccuracies in our system if we have an outage which could be avoided using the 2-way mechanism.
3) We need to record all messaging activity of our SMPP customers to allow billing and reporting.

I hope this helps justify our need.

Dave
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3406
Registered: 08-2008
Posted on Tuesday, August 09, 2011 - 03:02 pm:   

Hi Dave,

A setting to facilitate this is under development.

I don't think it will be ready with the fix for the DuplicateUserReceiptsFor2Way setting on Thursday, but it should follow shortly thereafter.

--
Des
NowSMS Support
Dave Baddeley
New member
Username: Davebaddeley

Post Number: 16
Registered: 06-2011
Posted on Tuesday, August 09, 2011 - 03:05 pm:   

Great news; let us now ASAP when you have an ETA

Thanks

Dave
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3410
Registered: 08-2008
Posted on Wednesday, August 10, 2011 - 10:32 pm:   

Hi Dave,

We managed to add a companion setting for DuplicateUserReceiptsFor2Way=Yes that copies all received messages to the 2-way command processor.

I posted more detail in the related thread at http://support.nowsms.com/discus/messages/1/70412.html.

--
Des
NowSMS Support