Here [0] are a list of Twilio libraries. I used the erlang one a couple years ago for a pretty basic application, similar to patio11's. I was traveling to Canada for a couple weeks and picked up a pre-paid SIM. I set up my primary phone to forward to my twilio number which in turn connected to my temporary number. Pretty unnecessary (I received no calls, and often forgot my phone at the house I was staying it), but a good learning exercise.
The erlang library is at [1]. It doesn't look like it's been touched in a while, though. I've also not touched Twilio since then so I have no clue if that's an issue or not. Though I'll probably use a similar setup for a longer trip planned for this summer so maybe I should track down that code.
Sounds like fun though - there's something cool about doing stuff in the "real world" beyond the screen that is somehow satisfying.