2-Way SMS activating two commands

2-Way SMS activating two commands SearchSearch
Author Message
Marcos Nowosad
New member
Username: Mnowosad

Post Number: 8
Registered: 08-2006
Posted on Wednesday, October 04, 2006 - 06:49 am:   

I have two commands setup in the 2-Way command table. None of them have a specific SMS command prefix. However, one of them (let's call it "Command A") should only be activated when the Receive Phone Number is 11111. So that's how my Command table is setup:

Command: Command_A.exe
SMS Command Prefix: *
Receive Phone: 11111

Command: Command_B.exe
SMS Command Prefix: *
Receive Phone:

I would expect that for a giving incoming SMS message like "This is a test", with receiver phone like 55555, "Command B" would be the only command executed. However, what we are seeing is that both "Command A" and "Command B" are being activated!

Isn't the receive phone supposed to be used as the branching factor in this scenario? Since the receiver phone is NOT "11111", why the "Command A" is being executed?

As an extra note, the messages to number 11111 are coming from a different SMSC connection than messages to all other phones. Could we use the information about the originating SMSC connection as the factor to decide about which command to execute? How we can use this information in the 2-Way command configuration in NowSMS?

Thanks,
Marcos
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6629
Registered: 10-2002
Posted on Wednesday, October 04, 2006 - 08:01 pm:   

Hi Marcos,

There is no way for a 2-way command to cause 2 different commands to be triggered. So I suspect that something else is going on. (I'd have to see an SMSDEBUG.LOG showing the messages being received, and the commands being triggered in order to understand.)

The receiving SMSC cannot be used as a factor for deciding which command to execute. HOWEVER, it can be passed as a parameter (@@SMSCROUTE@@) to the 2-way command, so that the 2-way command can take different action based upon this value. Unfortunately, it appears that this parameter is only available to HTTP based commands, not local executables. (I'm not sure why this is the case, but I can confirm that is. I'm investigating to see if there is a good reason for why this is, and if not, looking to get it added.)

-bn
Marcos Nowosad
New member
Username: Mnowosad

Post Number: 9
Registered: 08-2006
Posted on Wednesday, October 04, 2006 - 08:48 pm:   

Hi Bryce,

Thanks for the response. I will be sending shortly the SMSDEBUG.LOG file to the your email (NowSMS@now.co.uk), together with the SMSIN.LOG, SMSOUT.LOG and SMPPDEBUG.LOG.

Just to clarify: I just listed executable commands in my example for the sake of simplicity. We are, in fact, registering HTPP URLs for web service methods in the 2-Way command table.

As you can see, from the log files, even though the message "Hi marcos" is routed correctly to the destination number, there is a second message that is being generated, with the text "Command not completed. Request returned invalid content type: text/html".

In our web method, after we execute the command, we return a URL redirection (through .NET Response.Redirect()) which contains a URL pointing to the NowSMS web gateway, that forwards the message to another number. I checked the code more than once and the content type of the Response body is definitively "text/plain". So I do not know from where this second message "invalid content type: text/html" is coming.

Thanks,
Marcos
Marcos Nowosad
New member
Username: Mnowosad

Post Number: 10
Registered: 08-2006
Posted on Wednesday, October 04, 2006 - 10:55 pm:   

Hi Bryce,

I solved the problem. I had the "Command returns response text" turned on for the command. This was causing the message generated by the redirection action to be sent to the destination number and the response body (with 302 HTML code)to be returned to the sender number. Of course, the latter message was not our intent and was generating an error, since it contained HTML tags. By disabling the "Command returns response text", I got rid of the second message.

Thanks,
Marcos
ekow des bordes
New member
Username: Ekowdb

Post Number: 1
Registered: 10-2006
Posted on Thursday, October 05, 2006 - 01:37 pm:   

hi, i am working on a programme for my company, whereby mobile uses can txt in to a question that was broadcast, and if the answer is right, they should recieve a txt saying their answer is right and if its wrong too, they should recieve a txt telling them so, can anyone help me out here, please i need a script to run this
Ben Smith
New member
Username: Bms

Post Number: 1
Registered: 10-2006
Posted on Thursday, October 05, 2006 - 08:19 pm:   

Alright.

I have an 02 sim card and a Nokia 6230 phone. I recently text 02 for the MMS settings as when I receive one I only get an SMS saying go onto the 02 website to view it. I can't seem to receive MMS's in my phone's MMS inbox. Once I received and saved the MMS settings, I now get neither the MMS in my inbox or a text saying its on the website.

Help would be much appreciated.
Ben Smith
New member
Username: Bms

Post Number: 2
Registered: 10-2006
Posted on Thursday, October 05, 2006 - 08:22 pm:   

Sorry, just noticed this is the SMS bit. I'll post in the other section
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6634
Registered: 10-2002
Posted on Friday, October 06, 2006 - 02:30 am:   

Hi Marcos,

Glad to hear it was resolved.

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

Post Number: 6635
Registered: 10-2002
Posted on Friday, October 06, 2006 - 02:32 am:   

Ekow,

With NowSMS, we call this 2-way SMS.

You can find more information about NowSMS elsewhere in this web site.

For a quick overview of What NowSMS is, see http://www.nowsms.com/whatisnowsms.htm.

For more information on 2-way SMS, I recommend the following:

http://www.nowsms.com/documentation/ProductDocumentation/2_way_sms_support.htm
http://support.nowsms.com/discus/messages/1/4520.html

-bn