Tuesday, January 17, 2012

twerp - Command-line tool for Twilio hackers

I released twerp 0.0.4 today. Here's what you can do with twerp from the command-line today:

  •  Send and receive SMS text messages
  • Make voice calls and conference calls
  • List all calls in progress, ringing or queued
  • Enter interactive mode after initiating call and controlling call flow live
  • Tail your Twilio API error log from the command-line!
  • List all your Twilio phone numbers and detailed info about each
  • Show log entries for given SID
I'm going to make a screencast showing how to use twerp to start a phone call, go into interactive mode and control the flow of the call by issuing commands. 

Here's an example:

twerp --dial +12135551212 --say "Hi, this is twerp calling. How are you?" --interactive
 twerp (CA3j...043) >> forward +18005551212
twerp (CA3j...043) >> url http://server.com/some_twiml.xml
twerp (...)  >> list
Ringing: CAaaec865YADAYADA68c4a864ec
twerp (CA209...9ec) >> hangup
Call hung up.

There's not much point in making a TODO now, because twerp has barely covered a fraction of the Twilio API. That said, it's already very useful for hacking on Twilio, understanding how call flow works with TwiML, checking your Twilio logs etc.

In the near future:

  • Put your TwiML in ~/.twerp/twiml/ and you can execute it without uploading it to a server (it simply uses the Twimlet for echoing TwiML).
  • Easier conference calling with interactive control from the command-line or via touchpad
  • Distribute-based plugin system using entry points so you can make your own command-line applications based on twerp, installable with pip.

No comments:

Post a Comment