RSS Feed for This PostCurrent Article

Sending SMS from Website using GSM Modem

There are a couple of times we are asked on how to send SMS from an ASP.NET web application using a GSM modem. Normally in this case the user will try to directly connect to the GSM modem from within the web application and perform the sending.

Normally this will not work as the web application is hosted under a web server, and sometimes this could cause a problem.

Scenario 1 – Web application and GSM modem is in the same machine

Instead you should develop a Windows service that listens to a database table for incoming message. The web application should inserts messages to be sent into an outgoing message table.

The Windows service should regularly check for incoming messages from the modem, and insert those messages into an incoming message table. The web application accesses the table to check for newly arrived messages.

Scenario 2 – Web application and GSM modem are on different machines

If your web application is hosted somewhere else under a web hosting company, the web application will still insert the outgoing messages into a database table. But now you will need to develop a web service to return those newly inserted messages.

On the machine that you have the GSM modem installed, invoke the web service to get the outgoing messages, connect to the modem and send out the messages. You could call another web service to update the status back to the database.

If you are looking for sample source, have a look at SmartGateway which is available at Google Code.

Trackback URL

Sorry, comments for this entry are closed at this time.