Stuff we noticed while building "Asterisk in the cloud"
-
Upload
troyd -
Category
Technology
-
view
1.240 -
download
1
description
Transcript of Stuff we noticed while building "Asterisk in the cloud"
![Page 1: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/1.jpg)
stuff we noticed while buildingAsterisk in the cloud
Atlanta Asterisk Users Group
Troy [email protected]
twitter.com/troyd
cloudvox.com@cloudvox@ifbyphone
![Page 2: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/2.jpg)
Every cloud is special in its own way
![Page 3: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/3.jpg)
Automated Phone Calls
• Riding on 10 years • Have framework(s), need appS• What can we build, quickly?
![Page 4: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/4.jpg)
AGI
• Java (Asterisk-Java)• Ruby (Adhearsion, Telegraph, RAGI)• Perl (Asterisk::FastAGI)• PHP (PHP-AGI)• Python (Twisted/StarPy)• C# (monotone, Asterisk.NET)• C (CAGI)
![Page 5: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/5.jpg)
Adhearsion
• Serverahn start daemon voiceapp/
![Page 6: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/6.jpg)
Adhearsion
• Serverahn start daemon voiceapp/ • Entry points
server hits: agi://any.where.org/acontext?b=cclient runs: acontext { Ruby-as-dialplan }
![Page 7: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/7.jpg)
Dialplan Representations
Bindings match Asterisk• Exposes native Asterisk calls• Different languages (mostly) look the same• PHP-AGI, Asterisk::AGI, basic Asterisk-Java, RAGI
![Page 8: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/8.jpg)
Dialplan Representations
Bindings match Asterisk• Exposes native Asterisk calls• Different languages (mostly) look the same• PHP-AGI, Asterisk::AGI, basic Asterisk-Java, RAGI
Bindings match language model• Wrap head around abstraction• Easier to maintain, harder to replace• Adhearsion, full Asterisk-Java, Telegraph
![Page 9: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/9.jpg)
Dialplan Representations
Bindings match Asterisk• Exposes native Asterisk calls• Different languages (mostly) look the same• PHP-AGI, Asterisk::AGI, basic Asterisk-Java, RAGI
Bindings match language model• Wrap head around abstraction• Easier to maintain, harder to replace• Adhearsion, full Asterisk-Java, Telegraph
Think like Asterisk or think like the language?
![Page 10: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/10.jpg)
PHP-AGI
• Serverxinetd • Entry points
server hits: agi://any.where.org/?b=cxinetd executes: myapp.php # very dialplan-ish PHP
![Page 11: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/11.jpg)
gist.github.com/4670 - Adhearsion
![Page 12: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/12.jpg)
gist.github.com/4670 - get phone #
![Page 13: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/13.jpg)
Phone + HTTP service (Telegraph)
![Page 14: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/14.jpg)
• Don't transfer burden to user• Where does phone-specific code sit?• Latency
IVR forms (Telegraph)
![Page 15: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/15.jpg)
tinyurl.com/marsphoenix - Poll
![Page 16: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/16.jpg)
tinyurl.com/marsphoenix - Call
• App-initiated• Channels• Sync/async
![Page 17: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/17.jpg)
Testing
• “Can you here me now?” is barely testing
![Page 18: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/18.jpg)
Process
• “Can you here me now?” is barely testing
• Paper first• Small first• Placeholders first
• Debugging tools
![Page 19: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/19.jpg)
Deployment
AGI(agi://else.where.com/agi.pl|arg1|arg2|...)
or
AGI(agi.pl|arg1|arg2|...)
![Page 20: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/20.jpg)
Harder than it could be
• ASR & good TTS• SMS• Video
![Page 21: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/21.jpg)
DTMF Anywhere
Event: DTMF
Privilege: dtmf,allChannel: IAX2/instance-X-YYYUniqueid: cloudvox.com-12345Digit: 5Direction: ReceivedBegin: NoEnd: Yes
![Page 22: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/22.jpg)
Conference Pipes
• fake conference call participant
• creative use of Originate
• Channel + Context
= magic Music on Hold, Playback, Speak, <anything> intoa conference room
![Page 23: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/23.jpg)
Bring your own carrier, or don't
• carriers are specialized
• Cloudvox isn't everywhere
• we're a hosting service
sip:<any number or exten>@<x>.cloudvox.com
![Page 24: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/24.jpg)
Bring your own carrier, or don't
• carriers are specialized
• Cloudvox isn't everywhere
• we're a hosting service
sip:<any number or exten>@<x>.cloudvox.com
• priced for use: remote SIP == 1 cent per minute
![Page 25: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/25.jpg)
Number metadata API (free)http://digits.cloudvox.com/4252101234.json
![Page 26: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/26.jpg)
Number metadata API (free)http://digits.cloudvox.com/2124561111.json (White House)
![Page 27: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/27.jpg)
Number metadata API (free)http://digits.cloudvox.com/6506929100.json
![Page 28: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/28.jpg)
<phone number you care about>
![Page 29: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/29.jpg)
<phone number you care about>
http://digits.cloudvox.com/
![Page 30: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/30.jpg)
<phone number you care about> <.json>
http://digits.cloudvox.com/
![Page 31: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/31.jpg)
DNS API
host -t TXT 2065460420.na.digits.cloudvox.com
![Page 32: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/32.jpg)
What can I do?
• Get realtime number info from existing tools
• Augment phone number displays
• Analyze a group of numbers
• Customize call logic
![Page 33: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/33.jpg)
Be lazy in what you send,and liberal in what we accept.
• 10, 7, 6, 3 digits
• Already parsed, or best guess
• Same reply format for all queries
• REST, DNS, browser
![Page 34: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/34.jpg)
AGI + SMS to same numbers
• "Call or SMS 206-555-1234"
• No short code or shared code
• Not integrated with Asterisk (HTTP is simpler)
• Maybe down the road?
![Page 35: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/35.jpg)
Asterisk scaling: call-as-unit
![Page 36: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/36.jpg)
Asterisk scaling: data store routing
![Page 37: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/37.jpg)
Asterisk scaling: standard components
![Page 38: Stuff we noticed while building "Asterisk in the cloud"](https://reader033.fdocuments.in/reader033/viewer/2022061222/54c1b23f4a79590b2d8b4617/html5/thumbnails/38.jpg)
Asterisk scaling: escape valve(s)