tags:

views:

3211

answers:

15
+30  Q: 

Programmatic SMS

What is the best way to programmatically send an SMS text message?

Are there any free Web Service based SMS gateways?

I know that if I happen to know the user's carrier (Sprint, AT&T, etc), I can send an SMS by emailing an address based on phone number + carrier. I would like a good solution that does not require me to know the carrier. Barring that, is there an easy way to lookup carrier given a cell phone number?

I understand that there are some services independent of the major mobile carriers that offer a per-message fee-based service, with API. What I would like to know is how such organizations tap into the SMS networks. Do they have contracts with mobile carriers to resell their services?

A: 

What you want is not legal. You can search for "public" SMS gateways and find some but that's not legal. The legal thing is to contact a mobile provider and ask for a contract to send SMS messages massively. They'll provide you with many services like short numbers so your customers can send you SMS easily.

But, why to worry about that when you have a free service like Twitter.com that's universal free? The only thing you must do is to convince your customers to follow your app updates and lets them decide if they want SMS messages, IM alerts, or just a simple record in their twitter page.

ggasp
That's just completely wrong.
Georg
A: 

I don't want to use Twitter. I'm not necessarily trying to update users on my application, and I don't want to limit myself to only Twitter users.

Terrapin
A: 

That's ok. I only give you the straight and, from my POV, right answer and a cheap alternative.

For the contacts in the telcos, I can only give you from South America. I work for one of them!

("Updates" is the name that Twitter gives to every post)

ggasp
A: 

I don't know of any free SMS services, you usually buy bulk sms'seses and use an API to send them out.

Whitepages.com has an API that will allow developers to reverse lookup a phone number. It reports the carrier on mobile number, however a lot of the time it's some non-existent-anymore carrier like Powertel or something.

Grant
+7  A: 

Where I work we've been using http://www.clickatell.com for sending out SMS - it looks like its about 6 or 7 cents a message. They just take http POST requests to send out a message. I don't know if you'll be able to find any good free gateways. We used to send out emails, but found they were unreliable.

Angus
+18  A: 

Terrapin,

I doubt you'll find a free SMS service. The usual approach is to find a gateway provider or broker (they are generally independant of the telco) that has the kind of service your after. You usually buy a block of SMS messages, the more you buy the cheaper they are. Also make sure that the provider has an API that you can integrate with, no point buying service if you can't talk to their endpoint.

In the UK I've used these guys http://www.2sms.com/index.aspx but google has a comprehensive directory of providers here http://www.google.com/Top/Computers/Mobile_Computing/Wireless_Data/Short_Messaging_Service/

Hope this helps.

Kev
A: 

Supporting Angus, I can vouch for http://www.clickatell.com. It was used at a company I used to work at. It was a very easy solution to setup and use and worked great. You just need to anticipate how many messages you intend to send out and bulk order messages. They're pretty cheap, overall.

Jeremy Privett
+5  A: 

I've used clickatell in the past and found them very good also.

However, You could build your own to get messages VERY cheap. All you need is: a contract which gives loads of (or unlimited) messages; windows mobile phone; and a bit of socket programming.

Write a web service (pass the number and the message) which makes a call to a program on the mobile which sends the message.

I know of at least FTSE100 company which went this route.

Matt Lacey
Most "unlimited" texting plans have some clause that lets the provider cut you off if you're abusing the system - sending out tens of thousands of automated texts might count :)
sk
Yes, if you're sending thousands, this might not be a workable solution.
Matt Lacey
A: 

I have been doing that with a nokia phone, connected to a linux machine. I have a cron job and a script that would check a database table for new messages and use gnokii to send messages. It works great if the number of sms you are goig to send isn't to big.

Michał Piaskowski
A: 

how easy is it to integrate clickatell into a blog/cms? i want to have a feature where i say "send me a copy of this post to my mobile next week".

mrtunes
A: 

Also refer to this (not very helpful, though)

matli
A: 

edit 2: sorry, after re-reading your question i realized this is not the answer your looking for. However this is what i did for my command line program. Theres a website where if you put in the telephone number it gives you the carrier. So when i entered my number it screen scraped the website, got the carrier and if the carrier is in my list, i retrieved the email of that carrier

Most companies offer a SMS to email kinda thing. For example [email protected] or something (theres a whole list on wikipedia).

I used that to create my self a little command line application in c# that sends out text messages. However, you dont really get a "reply" and the number is a pre assigned one from the company.

I think if you want to go the free route, this is your best bet.

edit: heres the wikipedia link: http://en.wikipedia.org/wiki/SMS_gateways

masfenix
+2  A: 

You could also get a GSM transmitter and issue AT commands that send sms's. Don't know why you would want to do it this way, but it's another option. This way you won't depend on someone else service

Ubersoldat
+2  A: 

Check out publisher section on udefn.com. udefn provides free sms api, which you can easily integrate into your application. It allows for polling for messages (so you don't have host the application), or you can setup postback to receive incoming messages. There are code samples available to get you started.

You code your applications as bots and share it with set of users or with everyone. And its free to create and publish bots. For mobile users, there is no cost either (other than their standard rates with their service provider). Users simply add your application/bot to their profile, define a keyword and start using it.

The idea behind udefn is that users define their keyword (increasing the probability of them remembering it and using it). And for bot publishers, its a zero cost way to sms'ise their application. udefn has a dedicated shortcode 51406 (in US for now and international support will be added soon)

A: 

We got fed up with using 'free' sms gateways, very unreliable.

Now we use an sms gateway device called OutboxSMS from Felltech Ltd. It sits on our network and hooks directly into out mobile phone provider using a wireless link from it's built-in transmitter. We needed to buy a SIM card (we got a PAYG with a huge bundle of messages), which is fitted to the OutboxSMS unit. We configured an email account for it on our mail server (MS Exchange), and configured the SMTP/POP3 account on the box.

We use OPManager, this sends alerts by email, which we direct to outboxsms, it parses the message and sends a text message to our ops guys phones when something goes wrong.

We also have some shell scripts which use sendmail to send an email to outboxsms, which again is converted to text messages.