11|08 Big drink phone client
I've been playing with Asterisk for a few days and decided to write a dialplan that allows CSH members to drop drinks via any telephone in the world. To use the phone client, you need to get a PIN number for your CSH account. Once that's done, simply call (360) 469-0196 and follow the hideously robotic sounding prompts.
How it works: You pick up a phone and dial the 360 number, the call is routed to IPKall, a DID provider in Washington State. The IPKall switch (probably running Asterisk) looks up the number you called in their database and associates it with a SIP server. IPKall connects to my virtual machine running Asterisk on CSH using SIP.
Asterisk throws you in the inbound context, followed by the drink context when you press '1'. It reads a six digit pin number from you and passes it off to a Python script running under AGI for authentication. The Python script checks the pin number database and returns the result to Asterisk.
Once the user is authenticated, the list of all drinks in Big Drink are read back to the user using Festival, an open source text-to-speech engine. Once you've selected a drink, the extension number is passed to another AGI script that talks to Drink with the Sunday Protocol and drops your drink. If any errors are sent back from the server, they are spoken to the user via Festival.
It's not a perfect system. Currently, usernames and passwords must be stored as plaintext in the database. When we get the new LDAP server running, the PIN will be associated with the user in LDAP and I won't ever have access to the usernames and passwords. For now, all users are trusting me not to look at the data. I have no need to steal anybody's drink money, that's not cool.