开发者

Replying to an SMS sent from a modem of SMS service?

开发者 https://www.devze.com 2022-12-18 18:11 出处:网络
I am trying to implement my own theoretical SMS web service (just to understand how this stuff works, I have posted a few other related questions, I think this is it).

I am trying to implement my own theoretical SMS web service (just to understand how this stuff works, I have posted a few other related questions, I think this is it).

  1. Set up a PC. It takes requests from a website I make to send out SMS messages: a user-entered destination phone number, and a user-entered text message
  2. I get a GSM modem, or just a GSM phone. I connect it to the computer.
  3. I get a service plan from Verizon or whoever, some sort of unlimited SMS messaging plan.
  4. They give me a SIM card, which has my unique phone # attached to it (ex: 555-5555). I stick this in the GSM modem.
  5. I get some application (like Kannel) which handles interfacing with the modem and sending out the messages from my machine.
  6. Now users can visit my theoretical website, enter a phone # and message. I grab that data, forward it to Kannel. Kannel interacts with the modem, passing it the data for the message. The modem interacts with the carrier network I signed up with, and broadcasts the actual SMS to it. The carrier network handles routing the message to the actual destination.

This is my understanding of how it works. Now the recipient of this text message will see this message pop up on their device from my modem's number (555-5555). In fact, all the thousands of people using my service will all see the same origin phone 开发者_StackOverflow社区number.

If that's so, how do these 3rd party SMS applications give people unique #s for replying to messages they send out?

For example, when I sign up for one of these 'free' SMS services on iPhone, they assign me a unique user ID, like '123'. My friend is on a normal AT&T phone plan. He can send an SMS addressed to '123', and somehow I will get the message. How does AT&T know to route that to this third party service? I can't imagine that they would somehow get a new SIM card with a unique phone number per user that signs up for their service!

Thanks for all your help.

Thanks


The cell network carriers (e.g. AT&T, Verizon) actually rent out custom phone numbers (called "short codes") to 3rd parties to use.

You usually can't acquire these short codes directly from the carrier, but you can go through a 3rd party company to rent the short code. I've worked with companies like MBlox and OpenMarket to use carrier short codes. These companies are sometimes referred to as "SMS/MMS messaging aggregators," because they aggregate messaging services across multiple carriers and offer them to people/companies like you. Most of the time the aggregator will expose some sort of API (SOAP/XML or binary protocol) to access the messaging services to send and receive messages.

There may be other ways to do it, this is just my experience.


I think your comment at the bottom of your message is misleading.

Your friend probably doesn't send a message to "123" infact he probably sends "123 hello george" to a central number, which in turns routes "123" on to you, behind the scenes.

FWIW, mobile messages can appear as though they come from anything (including, for example, a word, and not a number).

Your general underlying assumption as to how gateways work (acquiring simcards) is accurate enough.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号