NowSMS, 2-way, SMSC and web service

NowSMS, 2-way, SMSC and web service SearchSearch
Author Message
Andrew Fothergill
New member
Username: Afothergill

Post Number: 1
Registered: 10-2006
Posted on Thursday, October 05, 2006 - 09:30 pm:   

Can some one help me with the following:

I have a web service in Visual Studio.net which I am calling through 2-Way using SMPP. I need to know what the relationship is between NowSMS, SMSC and the web service.

I'm trying to understand how the SMS message is routed to the Web Service, and how the response from the Web Service is routed back to the sender. For example if I call the web service via 2-way, how is the SMSC involved.

So essentially I'm after the message flow between the sender, NowSMS, SMSC, and the web service, and a overview what processing takes place.

thanks
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6633
Registered: 10-2002
Posted on Friday, October 06, 2006 - 01:26 am:   

Hi Andrew,

I'm not sure that I understand your configuration myself.

I'm assuming that NowSMS is talking to the SMSC via SMPP, is that correct? (There are many configuration variations, so I want to make sure I understand your setup.)

If that is correct, then the logic flow is:

1.) The sender submits the message to a number that is routed to the SMSC (how it is routed to the SMSC can vary by provider, and is outside of the scope of NowSMS).

2.) NowSMS has an SMPP connection to the SMSC through which the SMSC pushes the message to NowSMS.

3.) NowSMS receives the message and determines that it needs to be routed to a 2-way command.

4.) NowSMS issues an HTTP request based upon the 2-way command configuration, passing the message details as variables in an HTTP GET URL request.

5.) The script processing the HTTP request receives the message details, and performs whatever processing is required. This might involve returning a plain text response back to the HTTP request to send a reply back to the originator ... or it may involve issuing one or more new HTTP requests back to NowSMS to send one or more messages, perhaps to the originator or perhaps to other parties.

5.) If NowSMS recieves a plain text response, it uses that text to send a reply back to the originator. This reply would normally be routed back via SMPP to the same SMSC (but it could take a different path ... for example some people recieve their 2-way messages via a GSM modem but route replies back out via a separate SMSC connection).

Hope that helps.

-bn
Andrew Fothergill
New member
Username: Afothergill

Post Number: 2
Registered: 10-2006
Posted on Friday, October 06, 2006 - 02:53 am:   

thanks Bryce that has certainly stopped me from scratching my head. And thanks for the speedy response.

Now when my application as finished processing the message and wants to send back a response - assume we are dealing with dynamic content - is it also the responsibility of the application to also send back the page/deck/cards. In other words, is the service responsible for the look and feel of the data it sends back to the mobile device. And if so, what is the basic structure of the message i.e header info, field format, actions to be taken. Assuming my application server is java based (or whatever is easiest for you)
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6674
Registered: 10-2002
Posted on Friday, October 13, 2006 - 09:58 pm:   

Hi Andrew,

Sorry, we were doing final work on a maintenance update this past week, and it resulted in my falling way behind with responses here on the forum.

The service would be responsible for the look and feel of the data. Keep in mind that with SMS, you are very limited in what you can send, so there is not much of a "look and feel".

Of course, your service could send back a WAP push link instead of an SMS link, which would prompt the user to access an HTTP link on your service. The UI of how a mobile phone presents a WAP push can differ from phone to phone, and not all users are used to interacting with WAP push messages, so that could be an issue.

-bn
Biplab Swain
New member
Username: Biplabswain

Post Number: 1
Registered: 10-2006
Posted on Sunday, October 29, 2006 - 04:12 pm:   

Hi! I have a couple of querries:
1)I was wondering if it would be possible for a single SMS Server to rcv an SMS from one SMSC while replying back through another SMSC? If so, can I have a reference to the post or document regarding the same?
2)Suppose I have 2 sms servers in two geographically different locations. Is it possible for one SMS server which rcvs the SMS to transfer the querry to the other one over internet for processing & reply SMS? Any documents addressing a similar situation, if available?

Thanx
Biplab
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6755
Registered: 10-2002
Posted on Tuesday, October 31, 2006 - 08:27 pm:   

Hi Biplab,

1.) Yes.

It's mostly an issue of understanding how NowSMS decides which route to use for sending a message, which is described quite well here:

http://support.nowsms.com/discus/messages/1/11908.html

Then you need to understand a little bit about 2-way SMS:

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

Normally, people want the replies routed back through the same SMSC through which the original message arrived. But not always.

If you use the 2-way SMS approach of replying back with a simple text response, then NowSMS reverses the sender and recipient in the reply (the original sender becomes the recipient, and the original recipient becomes the sender). Sometimes this will cause the message to get routed back out the same SMSC because of the logic of sender-based routing, which one of the links above goes into more detail about. But if you're not using a "Default Sender Address" for your SMSC connection, then regular routing rules apply and it is easy to direct the replies to a different SMSC with standard NowSMS routing rules.

If you need more control over routing the replies, then you need to use the redirect technique for generating your SMS replies, instead of the simple text approach. The technical bulletin referenced above, as well as the PHP examples, talk more about this technique. Using that technique, you generate a complete URL telling NowSMS to send a message, and you can include more routing information in that URL request.

2.) Yes. I don't have any specific documents that explain this. And there are probably a variety of ways to accomplish this, depending on specific needs.

The way that I'd go about it would be this ...

Let's say Server A is your main server where you will do most of your processing.

Server B is a remote server where you will be interfacing with a particular SMSC connection, but you want received messages routed back to Server A for processing.

On Server B (remote), we're going to define an "SMS Users" account for Server A to initiate a connection to it, and enable SMPP login for this account. (This may seem a little counter-intuitive since Server A is your main server, but stay with me, and it will make more sense.)

Also on Server B (remote), select "Properties" for your upstream SMSC connection, and in the "Route SMS to Local User" connection, select the user account that you just defined.

On Server A (main), define a connection to Server B (remote) in the SMSC list. If you want to route any outbound messages back to that connection, define these routes in the "Preferred Connection for" list. Any messages received from Server B will get routed to the 2-way command processor on Server A.

-bn