I originally used AIM’s SMS support to send text messages to my friends from my computer. It worked, and my friends could reply to my texts, but the phone numbers it used were only temporary. My friends couldn’t initiate conversations with me via SMS; I had to text them first.
When Google Talk added SMS support, it included a killer feature: dedicated phone numbers. It didn’t give me a unique phone number for receiving texts via IM, but it did remember which phone numbers it had used for each of my friends, so they could text that number whenever they wanted. If I was online, I’d get the text immediately, as an IM. If I was offline, I’d get it when I logged.
I loved this, so I immediately switched to Google Talk for SMSes. Sadly, other people did too, and since each SMS costs money, Google decided to restrict the feature to official clients. Other clients received the error message “SMS_ERROR_11: Sorry we don’t support free SMS messaging through this client. Visit http://gmail.com/sms for more info. (Code 405)”
The restriction is fairly simple, though. The Google Talk servers simply
sms-v1 in the
ext attribute of
XEP-0115 Capabilities extension)
presence stanza that the client sends to the server.
google_talk_sms.pl simply adds this.
Here’s an example
presence stanza sent by the Google Talk web-based client:
<presence from="email@example.com to="firstname.lastname@example.org"> <priority>0</priority> ... <caps:c node="http://mail.google.com/xmpp/client/caps" ver="1.1" ext="pmuc-v1 sms-v1 vavinvite-v1" xmlns:caps="http://jabber.org/protocol/caps"/> ... </presence>
sms-v1. Here’s a similar
presence stanza generated by Pidgin and
before being sent to the Google Talk servers:
<presence> <priority>1</priority> <c xmlns='http://jabber.org/protocol/caps' node='http://pidgin.im/caps' ver='2.5.2' ext='moodn nickn tunen bob avatar sms-v1' /> </presence>