"reinventing the dialplan" slides from twilio's astricon 2009 talk

33
Astricon Oct 14, 2009 Reinventing the Dialplan Copyright 2009 Twilio

Upload: twilio

Post on 08-May-2015

9.566 views

Category:

Technology


1 download

DESCRIPTION

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.

TRANSCRIPT

Page 1: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Astricon Oct 14, 2009

Reinventing theDialplan

Copyright 2009 Twilio

Page 2: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Asterisk

Voice Applications

IVR

Company P

BX

Cli

ck-t

o-C

all

Con

fere

ncin

g

Page 3: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

The Cloud

Voice Applications

IVR

Company P

BX

Cli

ck-t

o-C

all

Con

fere

ncin

g

Asterisk

Page 4: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Voice Applications

Voice Guru

Page 5: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Asterisk

DialplanApplication

Native scripting languagewritten by your Voice Guru

Maintained by your Voice Guru

Asterisk DialplanLanguage: Native Scripting Where: Local on call router

Page 6: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Asterisk AGI/AMI

Java/C/Ruby...Application

IP

Asterisk AGI/AMILanguage: AGI/AMI API +

Java/C/Ruby/Python/EtcWhere: Remote via IP

Page 7: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Asterisk AGI/AMI

Java/C/Ruby...Application

IPMaintained by your Voice Guru

Asterisk AGI/AMILanguage: AGI/AMI API +

Java/C/Ruby/Python/EtcWhere: Remote via IP

Page 8: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Asterisk AGI/AMI

Java/C/Ruby...Application

IPMaintained by your Programmer

Asterisk AGI/AMILanguage: AGI/AMI API +

Java/C/Ruby/Python/EtcWhere: Remote via IP

Page 9: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Enter the Programmer

Programmer

•Commodity skillset

•Easy to hire

•Cheap

Page 10: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Asterisk AGI/AMI

Java/C/Ruby...Application

IPBetter but...

Large API with "lite" documentation. The distinction between AGI/AMI can

be confusing.

Tight integration between call router and voice app: direct socket

connections

SCALING=HARD

Asterisk AGI/AMILanguage: AGI/AMI API +

Java/C/Ruby/Python/EtcWhere: Remote via IP

Page 11: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Asterisk AGI/AMIIP

Lets mull this over...

Page 12: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Asterisk AGI/AMIIP

Why do I need aVoice Guru?

Page 13: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

AGI/AMIIP

What if I outsourcedmy voice guru?

Asterisk

Expert

Page 14: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Asterisk in the Cloud

AGI/AMIIP

Page 15: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Asterisk in the Cloud

?????IP

What is the ideal voice app API?

Page 16: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Web developers are (one of) the largest engineering workforces

on the planet

•HTTP

•Request/Response

•XML/JSON

•WAV/MP3

Page 17: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Asterisk in the Cloud

RubyMagic

Java

PHP

Python

Create new messaging protocoland new API for each language?

...

Page 18: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Asterisk in the Cloud

HTTP/XMLREST

Normal Web ServerHTTP/XML/REST

Ruby

Java

PHP

Python...

Page 19: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

HTTP/XMLREST

Normal Web ServerHTTP/XML/REST

Ruby

Java

PHP

Python...Twilio

Page 20: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

HTTP/XMLREST

Twilio

Leverage existing cloud hostingScale: 1-10,000’s of simultaneous calls

Google App Engine

Microsoft Azure

Heroku

Page 21: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Request/Response

digits = GetKeypadPresses();switch(digits) { case 1: blah(); break;}

1 Procedural programming

Page 22: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

1 Procedural programming

Not how HTML works!

digits = GetKeypadPresses();switch(digits) { case 1: blah(); break;}

Request/Response

Page 23: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

<form action=”digits.php”> <input type=”text” name=”digits” /> <input type="submit" value="Go"/></form>

2 Web programming

Request/Response

Page 24: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

<form action=”digits.php”> <input type=”text” name=”digits” /> <input type="submit" value="Go"/></form>

2 Web programming

Request/Response

Submit back to digits.phpon input

Page 25: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

<Gather numDigits=”5” action=”digits.php”/>

3 Web-like voice programming

Apply the same model forvoice applications

Request/Response

Page 26: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

<Gather numDigits=”5” action=”digits.php”/>

3 Web-like voice programming

Request/Response

Submit back to digits.phpon input

Page 27: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

$r = new Response();$r->append(new Say("Hello World");$r->Respond();

4 Language-specific libraries

PHP

r = twilio.Response()r.append(twilio.Say("Hello World"))print r

Python

@r = Twilio::[email protected](Twilio::Say.new "Hello World")puts @r.respond

Ruby

TwiMLResponse response = new TwiMLResponse();Say say = new Say("Hello World");System.out.println(response.toXML());

Java

Request/Response

Page 28: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

u.com b.com c.com

⤸HTTP 307 ⤸HTTP 307

Response Chaining

PBX Application Authorization Service

CRM Integration

Page 29: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Stateless ‘Twimlet’ URLs + REST

Page 30: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Stateless ‘Twimlet’ URLs + REST

curl -fSs -u "$ACCOUNTSID:$AUTHTOKEN" -d "Caller=$CALLERID" -d "Called=$PHONE" -d "Url=http://twimlets.com/message?Message=$MSG" "https://api.twilio.com/2008-08-01/Accounts/$ACCOUNTSID/Calls

Page 31: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

1 Put the Voice Guru in the CloudAsterisk in the cloud

2 Adopt a standards-based web APIHTTP/XML/REST

3 Leverage existing web infrastructureApache/Tomcat/AWS/AppEngine/Azure/Heroku

4 Let the cloud handling scaling1-10,000’s simultaneous calls

5 Don’t break request/response modelBuild libraries for PHP/Python/Java/C#/Ruby etc.

Page 32: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

The Cloud

Voice Applications

IVR

Company P

BX

Cli

ck-t

o-C

all

Con

fere

ncin

g

Asterisk

Page 33: "Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk

Simplifying TelecomSimple • Powerful • Pay-As-You-Go

Evan CookeCo-Founder & CTO

twitter: @[email protected]

http://www.twilio.com