Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Sending SMS from my web application


  • Please log in to reply

#1
multiplex77

multiplex77

    Member

  • Member
  • PipPip
  • 20 posts
Hi everyone,

I have an ASP.NET/C# web application that is currently hosted on a shared web host (the code and database are all on the shared server). I want to be able to send out and receive SMSes via this web application. i.e., administrator will choose a list of members to SMS, and when she clicks "Send", the mobile numbers of each selected member will be retrieved from the database and the SMS message sent to them individually.

I am aware that I can do this via a third party SMS service which I connect to using APIs. However my client wants to be able to use his own GSM modem and SIM card. This presents a problem because I can't plug in the GSM modem into USB port of the shared web host's server (obviously they won't allow it).

My client's office has a non-static ADSL internet connection. I'm thinking of connecting the GSM modem to a server in my client's office and get the web application (which is still on the shared web host) to communicate with the GSM modem. I would make use of Dynamic DNS to maintain a "fixed" URL.

My questions:

1. Is this a feasible solution? Is it possible for the web application to talk to the GSM modem on another machine?

2. Has anyone dealt with this kind of puzzle before? Any advice would be much appreciated.

Thanks all.
  • 0

Advertisements


#2
Phil

Phil

    IRC Chat Staff

  • IRC Chat Staff
  • 21 posts
This is something I've thought about quite a bit. The idea that I had was that you have a centralized database which the site sticks data into. You then have a separate PC (probably local) which has the GPRS modem attached. That should exectute the contents of the messages table in the database in a batch kind of form.

In your case, it does seem reasonable to have a "static host" for the dynamic IP from someone such as no-ip.com or dyndns.com. One thing to be sure about is that the internet connection on the local pc is stable and that you choose a reliable dynamic dns host.

~Phil~
  • 0

#3
multiplex77

multiplex77

    Member

  • Topic Starter
  • Member
  • PipPip
  • 20 posts
Hi Phil,

Thanks for your reply. That's along the lines I'm thinking too. The thing I can't seem to figure out is how to convey the data in batch from my web server to the local PC and back again. Everytime I send out SMSes, it could be to several hundred recipients. (And keeping in mind I can only send out 6-10 SMSes per minute.)

1. Should I send it (the numbers and message) in one batch via a POST to a web application running on my local PC? Or one by one (via POST or GET)?

2. How then do I process the acknowledgements for successful/failed send?

3. When receiving SMSes, the local PC then has to communicate with my web server. Does all this mean a very complicated interface I need to write for the two to talk to each other?

If you have any real world examples that you have worked on, please do share what you can. Thanks very much!
  • 0

#4
Phil

Phil

    IRC Chat Staff

  • IRC Chat Staff
  • 21 posts
I have not worked on anything of this sort however with a centralised database, this shouldn't be a problem.

You would have a users table, each user having an id. You would have a messages_out table with each message having an id and a user_id and a status. You would also have a messages_in table with each message having an id and user_id.

When the site needs to send a message, it writes it to the messages_out table with a status of "processing" or something. The application needs to select all records from this table where the status field = processing and then send all the messages then change the status field to something like "success" or "failed" depending on the result of the send.

This wouldn't be hard to show to the user on the site.

When an SMS is received by the local, you would write it to the messages_in table which, again, wouldn't be hard to show to the user on the site.

You talk of multiple recipents per message. For this, you would just need another table which would link the ids of the records in messages_out to recipent addresses.

I hope this helps.

~Phil~
  • 0

#5
multiplex77

multiplex77

    Member

  • Topic Starter
  • Member
  • PipPip
  • 20 posts
Hi Phil,

Yes that certainly helps a lot. So all the tables will reside on the database server hosted at the datacenter, and the PC's web application will read and write directly to/from that database. Thanks very much!
  • 0

#6
Phil

Phil

    IRC Chat Staff

  • IRC Chat Staff
  • 21 posts
That's certainly what I would do.

~Phil~
  • 0

#7
Phil

Phil

    IRC Chat Staff

  • IRC Chat Staff
  • 21 posts
Thinking about it, in this instance, it shouldn't matter that the local pc doesn't have a static IP or indeed a static host since it will never be connected to.

~Phil~
  • 0

#8
multiplex77

multiplex77

    Member

  • Topic Starter
  • Member
  • PipPip
  • 20 posts
Exactly! That's why a light lit up when I read your post!

I could config my SMS Gateway to poll the remote database say every 10 minutes to see if there are any queued messages in the outgoing messages table.

As for incoming messages, the Gateway will write to the remote database, and my web app can just pick it up on demand.

Thanks! You gave a fantastic suggestion.
  • 0

#9
Phil

Phil

    IRC Chat Staff

  • IRC Chat Staff
  • 21 posts
Glad to help :whistling:
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP