Problem with 2 way SMS

Problem with 2 way SMS SearchSearch

SMS & MMS Technical Forum » NowSMS Support - SMS Issues (Product Support Only) » Archive through March 09, 2004 » Problem with 2 way SMS « Previous || Next »
Author Message
Anonymous
 
Posted on Thursday, December 18, 2003 - 09:15 am:   

Hi ,i new to your product(trial).I tried to send an SMS Message from the web interface(8800) over http to a local server(Tomcat) running on port 8080.I wrote a sample JSP to print the Output in the Tomcat shell(sucessful).Then i tired to make a call to the gate way using response.redirect but no action seems to done.

My GateWay configurations

SMS Users-siva
SMSC -localhost:8080
URL Template-/test1.jsp?Phone=@@PhoneNumber@@&Text=@@Text@@
2-way -->Process Received sms message -->checked
Values in list box
*-------http://localhost:8080/test.jsp

My JSP deployed in tomcat are as follows.

test.jsp

<%
System.out.println("++++++++++++++++++==========");
System.out.println("This is test.jsp");

System.out.println("========+++++++++++++++==============");
%>


test1.jsp


<%
System.out.println("Inside test1.jsp");
out.println("Sample SMS page invoked");
String phone=request.getParameter("Phone");
String text = request.getParameter("Text");
System.out.println("The Entered Phone is ="+phone);
System.out.println("The Entered Text is ="+text);

response.sendRedirect("http://localhost:8800?PhoneNumber=232121212");
System.out.println("Response redirect fired");
%>








Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 1410
Registered: 10-2002
Posted on Thursday, December 18, 2003 - 03:31 pm:   

Are you doing this in a "2-way" command?

The redirect URL just includes a phone number, but no action to take. If you want to send back some text in the redirect, you would need to include "&Text=..." in the redirect URL.
siva
Unregistered guest
Posted on Friday, December 19, 2003 - 03:32 am:   

hi Bryce,
i am trying to implement 2 way sms in nowsms.

Steps done by me
1)I configured the nowsms to make a HttpRequest to my local tomcat server 8080 and invoke test1.jsp.
2)When i submit a sms request i able to see the test1.jsp fired with the entered phone number and text printed to the console.
3)Now my intention is to send a request back to the gateway from the tomcat server so added the response.sendredirect method with the url.
4)I have configured the 2 way tab of the now sms as
process received sms message as checked
* http://localhost:8080/test.jsp

5)What my understanding is that i when the sendRedirect fires the gateway will get the request and fires test.jsp.

6)Based on your Reply i modified the sendrediret as

response.sendRedirect("http://127.0.0.1:8800/?PhoneNumber=232121212&text=Hello");

but still the test.jsp is not fired.

7)Now browsing thru all the folder i found some error text i am pasting things here for your reference.

[SMS]
SubmittedBy=192.168.11.36
PhoneNumber=23232323
Data=sdfsds
pid=00
dcs=00
Binary=0
[ErrorDetail]
RetryCount=7
LastRetryTime=20031219095419


thanks and regards
siva

Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 1420
Registered: 10-2002
Posted on Friday, December 19, 2003 - 07:46 pm:   

Siva,

I'm sorry, but I'm still a bit confused.

It sounds like you're setting up a system that is some type of simulation environment rather than a live environment.

So let me explain what I think I understand about your setup, and if I understand incorrectly, you can clarify the setup for me.

It sounds like you have configured NowSMS with an HTTP SMSC connection. When it has an SMS message to send out, it calls your test1.jsp.

In such a setup, I cannot see how NowSMS would ever trigger a "2-way" request. The issue is that there is no way in such a setup for NowSMS to receive a message from the SMSC. It can only send out to an HTTP SMSC.

Under item #7 in your message, I take it that this is a message file that you found in the "Q" subdirectory. The fact that it is up to "RetryCount=7" suggests that NowSMS is having a problem connecting to the defined SMSC to route the outbound message. If "test1.jsp" is the script that is being called to process the outgoing message, then you need to make sure that it returns a standard HTTP OK (status code = 200) response. Otherwise, NowSMS will keep retrying. (I believe it retries up to 10 times before giving up and logging an error to the event log.)

-bn
Anonymous
 
Posted on Monday, December 22, 2003 - 04:21 am:   

hi Bryce,
You are correct.I am trying to stimulate.My intension was to send a message from the gateway to the server local tomcat server and inturn send a message from the tomcat server to the gateway over http.

Cant i make a http request from server (tomcat 8080) to gateway (8800)

if you can help well and good

thanx for the effort

Wish you Happy Xmas and NewYear.

thanx & regards
siva



Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 1444
Registered: 10-2002
Posted on Monday, December 22, 2003 - 09:10 pm:   

Siva,

Unfortunately you cannot simulate the 2-way facility in that type of setup.

Your web script could submit a new message into NowSMS, but it cannot make NowSMS think that a message has been received.

Sorry ... and happy holidays!

Cheers!

-bn

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