"Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk - Presentation Transcript
Reinventing the
Dialplan
Astricon Oct 14, 2009
Copyright 2009 Twilio
-Call
ing
c n
to
X
re
P B
Click-
fe
n y
on
R
pa
C
IV m
Co
Voice Applications
Asterisk
ci
-
n
to
X
re
P B
Click-
fe
n y
n
a
o
p
R
C
IV m
Co
Voice Applications
The Cloud
Asterisk
Voice Applications
Voice Guru
Maintained by your Voice Guru
Asterisk
Native scripting language
Dialplan written by your Voice Guru
Application
Asterisk Dialplan
Language: Native Scripting Where: Local on call router
IP
Asterisk AGI/AMI
Java/C/Ruby...
Application
Asterisk AGI/AMI
Language: AGI/AMI API + Where: Remote via IP
Java/C/Ruby/Python/Etc
Maintained by your Voice Guru
IP
Asterisk AGI/AMI
Java/C/Ruby...
Application
Asterisk AGI/AMI
Language: AGI/AMI API + Where: Remote via IP
Java/C/Ruby/Python/Etc
Maintained by your Programmer
IP
Asterisk AGI/AMI
Java/C/Ruby...
Application
Asterisk AGI/AMI
Language: AGI/AMI API + Where: Remote via IP
Java/C/Ruby/Python/Etc
Enter the Programmer
• Commodity skillset
• Easy to hire
• Cheap
Programmer
Better but...
IP
Asterisk
Large API with "lite" documentation. AGI/AMI
The distinction between AGI/AMI can
be confusing.
Tight integration between call router
and voice app: direct socket Java/C/Ruby...
connections Application
SCALING=HARD
Asterisk AGI/AMI
Language: AGI/AMI API + Where: Remote via IP
Java/C/Ruby/Python/Etc
IP
Asterisk AGI/AMI
Lets mull this over...
IP
Asterisk AGI/AMI
Why do I need a
Voice Guru?
IP
Asterisk AGI/AMI
Expert
What if I outsourced
my voice guru?
IP
AGI/AMI
Asterisk in
the Cloud
IP
?????
Asterisk in
the Cloud
What is the ideal voice app API?
Web developers are (one of)
the largest engineering workforces
on the planet
• HTTP
• Request/Response
• XML/JSON
• WAV/MP3
Magic
Ruby
Java
Asterisk in
PHP
the Cloud
Python
.
.
.
Create new messaging protocol
and new API for each language?
HTTP/XML
Ruby
REST
Java
Asterisk in
PHP
the Cloud
Python
.
.
.
Normal Web Server
HTTP/XML/REST
HTTP/XML
Ruby
REST
Java
PHP
Python
Twilio .
.
.
Normal Web Server
HTTP/XML/REST
HTTP/XML
REST Google App Engine
Microsoft Azure
Twilio Heroku
Leverage existing cloud hosting
Scale: 1-10,000’s of simultaneous calls
Request/Response
2 Web programming
<form action=”digits.php”>
<input type=”text” name=”digits” />
<input type="submit" value="Go"/>
</form>
Submit back to digits.php
on input
Request/Response
3 Web-like voice programming
<Gather numDigits=”5”
action=”digits.php”/>
Apply the same model for
voice applications
Request/Response
3 Web-like voice programming
<Gather numDigits=”5”
action=”digits.php”/>
Submit back to digits.php
on input
Request/Response
4 Language-specific libraries
$r = new Response();
$r->append(new Say("Hello World"); PHP
$r->Respond();
r = twilio.Response()
r.append(twilio.Say("Hello World")) Python
print r
@r = Twilio::Response.new
@r.append(Twilio::Say.new "Hello World") Ruby
puts @r.respond
TwiMLResponse response = new TwiMLResponse();
Say say = new Say("Hello World"); Java
System.out.println(response.toXML());
Put the Voice Guru in the Cloud
1 Asterisk in the cloud
Adopt a standards-based web API
2 HTTP/XML/REST
Leverage existing web infrastructure
3 Apache/Tomcat/AWS/AppEngine/Azure/Heroku
Let the cloud handling scaling
4 1-10,000’s simultaneous calls
Don’t break request/response model
5 Build libraries for PHP/Python/Java/C#/Ruby etc.
ci
-
n
to
X
re
P B
Click-
fe
n y
n
a
o
p
R
C
IV m
Co
Voice Applications
The Cloud
Asterisk
Call control is being reinvented in several excitin more
Call control is being reinvented in several exciting new ways. In this talk, we explore existing models for building voice applications using the Asterisk Dialplan, Asterisk AGI/AMI, and how new in-cloud voice APIs are reinventing the way that build, host, and scale voice applications.
such as in-cloud dialplan API with Twilio. Taking a programmer's perspective, we highlight desirable dialplan properties such as simplicity, automatic scalability, integration with existing databases and servers, and separation of business logic from telephony logic. We also explore the tradeoffs that Twilio has made to simplify the experience of building voice applications, including the concept of encapsulating the state of a voice call in a URL. We conclude with thoughts about how Asterisk could be streamlined for in-cloud dialplan APIs and the services that support them. less
0 comments
Post a comment