Way to bypass inbound message processor from the command line script? | Search |
NowSMS Support Forums ⬆ NowSMS Support - SMS Issues ⬆ Archive through February 09, 2012 ⬆ |
◄ ► |
Author | Message | |||
marcia piccione New member Username: Mpiccione Post Number: 3 Registered: 01-2012 |
Here is our problem: We need to split a shortCode between 2 destinations (NowSms client accounts). What we were hoping to do was use the 2-way / command line callback feature to process all inbound messages and determine which account to send the sms to. So, essentially, we would have to receive the inbound message, evaluate the destination, and then resubmit it. Problem is, how do we get around endless looping with the inbound processor? | |||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 3735 Registered: 08-2008 |
Hi Marcia, This seems to be related to your other question: http://support.nowsms.com/discus/messages/1/70765.html Maybe not directly ... but basically the technique is similar. Implement a 2-way command to process messages for this short code. Have the short code resubmit the message to the correct account by connecting back to NowSMS and appending the &LocalUser=xxxx parameter to indicate which account should receive the message. -- Des NowSMS Support | |||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 3736 Registered: 08-2008 |
Additional information submitted via e-mail:
What type of command line script is it? Does it involve a batch file? If it does, NowSMS needs to invoke a command processor first. Try the ECHO example in http://www.nowsms.com/doc/2-way-sms-support, and verify that you can make this work before moving on to your batch file. Once that is working, insert your batch file in place of echo in the example ... e.g., c:\windows\system32\cmd.exe /c c:\path\yourcmd @@SENDER@@ @@RECIP@@ @@FULLSMS@@ Is it VBScript or JScript? You need to include c:\windows\system32\cscript.exe in the 2-way command as NowSMS will not launch the command directly ... e.g., c:\windows\system32\cscript.exe c:\path\incall.vbs %@@SENDER@@ @@RECIP@@ @@FULLSMS@@ In either case, the best way to see what is happening when NowSMS tries to execute the 2-way command is to enable the SMSDEBUG.LOG. It will show how NowSMS is processing the message, and show the 2-way command that NowSMS is trying to execute, as well as the results.
You submit it back to NowSMS via HTTP as a new message, like I described in that other thread. So you don't have to follow the link, here is the relevant bit:
If you're using the command line JScript from http://www.nowsms.com/sending-sms-from-command-line, just modify the part where it builds the URL for submitting to NowSMS so that it adds these extra variables to indicate that the message should be routed to one of the local user accounts instead of the 2-way command processor. -- Des NowSMS Support |