Curious about adding voice menus and phone interactivity to your web apps? Twilio makes it easy and affordable to POTS-enable any app with just a few lines of code. Presentation references the twiliokit app on github.
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Getting Started with Twilio
1. CodeStock is proudly partnered with:
RecruitWise and Staff with Excellence - www.recruitwise.jobs
Send instant feedback on this session via
Twitter:
Send a direct message with the room number to @CodeStock
d codestock 503 This session is great!
For more information on sending feedback using Twitter while
at CodeStock, please see the “CodeStock README” in your
CodeStock guide.
5. Introduction to me :)
• Web development since 1996
• Mostly PHP, with some ASP, Perl and
Groovy over the years
• Publisher of GroovyMag and JSMag
• Host of webdevradio.com podcast
6. What is Twilio?
• Phone service in the sky
• Akin to a hosted Asterisk
• No hardware costs - pay as you go
• SMS,Voice calls, Automatic translations
• Built on the Amazon cloud
7. What can Twilio do?
• Phone recordings
• Conference calls
• Phone polls and voting
• Custom phone trees
8. What can’t Twilio do?
• Voice recognition
• No way to deal with “say yes” type apps
• Establish numbers outside US
• Can *call* outside US
• Probably other things I haven’t hit yet :)
9. OpenVBX
• Recently announced openvbx.org, a turnkey
open source PHP framework for managing
a phone system
• Mixed reaction - seen as competing with
developer community a bit
10. How does it work?
• register for account
• $30 sandbox credit
• sandbox dial in number
• uses acct-specific PIN code (only for
sandbox number)
11. How does it work?
• Map incoming number to URL
• Twilio server makes requests to your URL
• Your server app responds with TwiML, XML
for Twilio
14. Twilio POST to you...
$_POST[‘CallGuid’]
$_POST[‘Caller’]
$_POST[‘Called’]
$_POST[‘CallStatus’]
$_POST[‘CallerCity’]
and more...
http://www.twilio.com/docs/api/2008-08-01/twiml/twilio_request
15. You send back TwiML
<?xml version="1.0" encoding="UTF-8" ?>
<Response>
<Say>Hello World</Say>
<Play>
http://api.twilio.com/Cowbell.mp3
</Play>
</Response>
17. Let’s look at code
• Will be demoing PHP code in with Zend
Framework
• http://bit.ly/a7bT8h - good example of
ASP.NET MVC app with Twilio services
• Twilio has good Ruby and PHP libraries
• Has others, not as full featured yet