Brad Fitzpatrick (brad) wrote,
Brad Fitzpatrick
brad

fakesms server

The cool thing about having an extensible Jabber server/baseclass is that I can crank out crazy Jabber servers in minutes.

For testing LJ's upcoming SMS integration, we needed a way for developers to pretend they were sending and getting SMSes from their developer LJ installs. Also, non-technical employees needed to test, so command-line clients are out. Web stuff is too painful async. Working with carriers/SMS aggregators is 10x more painful than all that combined.

Solution? Jabber server, of course.

I forgot about this until I got a Google News Alert about it:
http://cvs.livejournal.org/browse.cgi/livejournal/bin/fakesms-djabberd

Users log in with username of 5551212 (or whatever phonenumber) and a password of "smstest" (arbitrary), then it's like they have that cellphone, from LJ's point of view.

Here's the server:
http://cvs.livejournal.org/browse.cgi/livejournal/bin/fakesms-djabberd?rev=1.3

The only new code are the two FakeSMS modules:
http://cvs.livejournal.org/browse.cgi/livejournal/cgi-bin/DJabberd/Delivery/FakeSMS.pm?rev=1.1
http://cvs.livejournal.org/browse.cgi/livejournal/cgi-bin/DJabberd/RosterStorage/FakeSMS.pm?rev=1.1

First one delivers messages into LJ (misc/fakesms.bml endpoints, only enabled for developers), and the other one just puts the sms@$SERVER item into users' rosters, to ease testing.

(SMS from LJ to Jabber is handled by the LJ code when $IS_DEV_SERVER)
Tags: djabberd, hacks, work
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 5 comments