APIdaze presentation at TADHack 2014

825 views

Published on

Slides presented at TADHack 2014 6 / 7 June in Teatro Goya Madrid - TADHack is the only global meeting place for developers who want to learn, share, code and create across the breath of telecom tools and technologies.

Published in: Technology, Design
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
825
On SlideShare
0
From Embeds
0
Number of Embeds
366
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

APIdaze presentation at TADHack 2014

  1. 1. TADHack 2014 APIdaze API What is it ? Who can use it ? How does it work ?
  2. 2. TADHack 2014 What is it ? ● Components to manage things VoIP related – calls to DID numbers and from SIP accounts or the Web (WebRTC/Flash UDP) ● SIP domains – vm.yourappkey.apidaze.voip ● DID numbers
  3. 3. TADHack 2014 From cloud PBX to API managed telephony ● A web interface to manage you PBX is fine ● Now VoIP engineers can build their own cloud PBX using an API ● And web developers can easily integrate telco applications
  4. 4. TADHack 2014 API components ● HTTP/REST ● HTTP/XML ● JavaScript ● … and developer programs
  5. 5. TADHack 2014 Who can use it ? ● VoIP engineers – call transfer, line supervision, voicemails, fax to email, etc. ● Web Developers – Who want to bring PSTN to WebRTC apps – Who want to stay away from SIP – And even more from : ● E1/T1, PRI, BRI, codecs
  6. 6. TADHack 2014 HTTP/REST ● A set of commands to – Place calls, send SMS and faxes ● And list and Create/Read/Update/Delete (CRUD) – DID numbers – SIP accounts – Voicemails boxes – Billing accounts
  7. 7. TADHack 2014 HTTP/REST example curl -v -X GET "https://api.apidaze.io/4561sd03/sipaccounts?api_secret=99f140425ed7ert4clgt19d9c0105283" [ { "id": "8", "name": "testsipaccount", "sip": { "username": "testsipaccount", "password": "FEtg5qZuyx0hoLYx" }, "callerid": { "internal_name": "testsipaccount", "internal_number": "", "external_name": "testsipaccount", "external_number": "" }, "created_at": "2012-07-24 22:38:25", "updated_at": "2012-10-05 17:08:36" } ]
  8. 8. TADHack 2014 HTTP/XML scripting ● XML documents written by the developer ● Stored in an web server controlled by the developer ● Downloaded via HTTP and executed when – A DID is called – A call is placed from a SIP account, or from the WebRTC/Flash UDP JavaScript API – Each call has his own context defined by the parameters sent within the HTTP request
  9. 9. TADHack 2014 HTTP/XML script example <document> <work> <speak lang='en-US'>Please wait while we're connecting your call</speak> <dial> <number>0033123456789</number> <sipaccount>bob</sipaccount> </dial> <hangup/> </work> </document>
  10. 10. TADHack 2014 Call example from the PSTN to a DID 1. Call comes in to a DID 2. URL of the External Script is fetched • URL : http://yourdomain.com/yourscript.php • Parameters include : Caller ID and Called number (DID), channel identifier 3. XML instructions from the previous URL are run • e.g. : <dial><sipaccount>bob</sipaccount></dial> 4. Call ends, URL of the External Script is fetched again • Parameters include : channel identifier, exiting=true
  11. 11. TADHack 2014 Call from a SIP account 1. Call comes in from a SIP account bob@vm.yourappkey.apidaze.voip 2. URL of the External Script is fetched • URL : http://yourdomain.com/yourscript.php • Parameters include : SIP from URI sip:bob@vm.yourdomain.apidaze.voip, desitnation, channel identifier 3. XML instructions from the previous URL are run • e.g. : <dial><number>0033123456789</number></dial> 4. Call ends, URL of the External Script is fetched again • Parameters include : channel identifier, exiting=true
  12. 12. TADHack 2014 JavaScript ● What web developers love – jQuery, Prototype/Scriptaculous – Now even on the server side with Node.js ● Being extended to realtime voice/video with WebRTC – getUserMedia function – PeerConnection object
  13. 13. TADHack 2014 JavaScript parameters ● Context : a call is placed from a web page – WebRTC or Flash UDP ● The developer adds JavaScript parameters – User identifier, number to call, etc. ● Those parameters are sent over HTTP to get the XML instructions – The call is processed by the developer's script
  14. 14. TADHack 2014 Call example from JavaScript 1. Call comes in from an HTML/JavaScript page 2. URL of the External Script is fetched • From the apiKey parameter • Parameters include : anything from the web page 3. XML instructions from the previous URL are run • e.g. : <dial><sipaccount>bob</sipaccount></dial> 4. Call ends, URL of the External Script is fetched again • Parameters include : channel identifier, exiting=true
  15. 15. TADHack 2014 JavaScript Events ● Often called « event driven programming » ● Events retrieved from the telco side – Call management events : Call Ringing, Call Answered, Call Hangup – In-call events : Text message, Who is talking (in a conference room)
  16. 16. TADHack 2014 Conferencing ● Text/audio/video bridge provided to PSTN, WebRTC and Flash endpoints – Text/audio available to WebRTC/Flash endpoints – Video for WebRTC endpoints (Chrome/Opera) ● AudioBridge is Asterisk based ● VideoBridge is Jitsi based ● Both without SIP or XMPP – Raw JSON text exchanged over WebSockets

×