[Twisted-Python] Using the Oscar protocol to send SMS text msgs
davedrouin at hotmail.com
Tue Sep 16 09:50:53 EDT 2008
I'm wondering if anyone happens to have an example of how to send an SMS message through AIM using twisted.words.protocols.oscar. Sending instant messages based on the code in oscardemo.py was simple enough, but when I tried to send a message to a phone number through an oscar.BOSConnection.sendMessage method such as:
self.sendMessage("+19995551212", [(msg,)], wantAck=0, autoResponse=False)
an SMS text message does not appear to be sent to the specified phone number, however, the number I tried to send the message to did end up appearing under "Recent Buddies" in AIM after trying this. If I then attempt to send an SMS manually through version 188.8.131.52 of the AIM client it works as expected. I'm guessing that perhaps a connection or ICBM parameter needs to be set to enable SMS messaging for the client connection made through oscar. I looked at the code for the oscar protocol in Pidgin to see if that would shed any light on what I could be doing incorrectly and didn't see anything special being done for SMS text messages there aside from converting them to plain text before sending the message along in the same way as IM's are sent except that the user name is a phone number in the +<area code><number> format I've been trying with.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python