开发者

Providing context for SMS

I'm trying to figure out how to set up an SMS service where users can communicate with people on phones that are not participating in my service. "TextFree" on iPhone does something like what I want to do. They let you sign up, then you can send messages for "free" to other friends that aren't part of the service.

It looks like when you sign up for TextFree, they assign you an email address [user@textfree.us]. People outside the service without MMS capabilities can't send an SMS to this user. The user must first send an SMS to them, starting a conversation. I think this is what they're doing:

  • Textfree signs up for an account with a bulk SMS provider, and is assigned a single phone #, like "123".
  • Joe signs up for TextFree, gets assigned email: joe@textfree.us.
  • Mary wants to send Joe an sms, but can't because she doesn't know what # to direct the sms to.
  • Joe sends an sms to Mary using textfree. This really just makes an http request to some textfree server. The server gets the request, and the destination # (Mary's phone).
  • The server sends the sms out using their bulk sms api provider.
  • Mary receives the sms, and sees the originator phone # as "123".
  • Mary replies to the sms, using this phone #, "123".
  • Their sms provider receives the message, and forwards it to textfree's http server.
  • Textfree now has to resolve that the sms received by Mary's phone # is destined for Joe (not sure how this can be done), so it can be delivered to Joe's account.

I think that all makes sense and seems feasible, I'm just not sure abou开发者_开发知识库t that last step, how they could figure out which conversation sms' belong to. If all outside users are directing their sms to phone #123, how could I figure out which internal user the message is destined for? Is there some way to embed a unique identifier in an SMS, so that when the external user replies to the SMS, some unique ID can be embedded in there to provide that type of context to read on the reply side of things?

Long question, thanks for any thoughts!


As for the last part of your question (unique ID in SMS): I know of no mechanism that could help you here. When replying to a short message phones only set the sender address as destination and the user is free to type the text. The headers in a short message PDU are solely for the basic transport parameters (encoding, sender-ID, ...). There is a way to define so called user data headers, but for this to be of any use for you, you'd have to be in control of most of the devices that are involved in the message delivery, including the handsets... So basically the only way I see to correlate messages with each other reliably is the use of some ID within the message text.

An alternate approach would be to rent a bunch of numbers and assign these permanently (I assume some subscription model here) to your users. This way you could use these as identification numbers within your service and forward the messages to their real phone numbers (or even a completely different media like email / instant messenger).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜