200 likes | 290 Views
Asterisk based real-time social chat. Advisor : Lian-Jou Tsai Student : Jhe -Yu Wu. Outline. Motivation. Telephony Technology. System Design. Conclusion. Reference. Abstract. Application. Motivation. To integrate WebRTC into SIP and PSTN. To simplify calling process. Abstract.
E N D
Asterisk based real-time social chat Advisor : Lian-Jou Tsai Student : Jhe-Yu Wu
Outline Motivation Telephony Technology System Design Conclusion Reference Abstract Application
Motivation To integrate WebRTC into SIP and PSTN. To simplify calling process.
Abstract This study aims to integrate new telephony technology like WebRTC with VoIP. The following slides will introduce telephony technology including PSTN and VoIP. The system design will show at the end of the presentation.
Telephony Technology • PSTN & VoIP
PSTN VoIP • Public Switched Telephone Network • Voice over Internet Protocol VoIP Server PSTN Figure 2. The VoIP architecture. Figure 1. The PSTN architecture.
Application • Asterisk & WebRTC
Asterisk WebRTC • Asterisk is a flexible and extensible suite of integrated telecommunications software. • WebRTC(Web Real Time Communication) is a open project • that enables web browsers withReal-TimeCommunications capabilities • via simple JavaScript APIs. • Supported Browsers
System Design • User interface & Core component
User Interface : jQuery JavaScript varxmlhttp; if (window.XMLHttpRequest){ xmlhttp = new XMLHttpRequest(); }else{ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange= function(){ if(xmlhttp.status == 200){ //ok } } xmlhttp.open("GET","ajax.php?data=ok",true); xmlhttp.send(); • jQuery is a cross-platform JavaScript library designed to simplify the client-side scripting of HTML. jQuery $.ajax({ url: "ajax.php?data=ok", type: "GET", success: function(){ //ok }})
User Interface : JSON XML <book> <type>textbook</type> <pages>256</pages> <title>Programming Pearls 2nd Edition</title> <rating>4.5</rating> <coverType>paperback</coverType> <genre>Computer Science</genre> <author>Jon Bentley</author> </book> • JSON is an open standard format that uses human-readable text to transmit data objects consisting of attribute–value pairs. JSON { "book": { "type": "textbook", "pages": "256", "title": "ProgrammingPearls2ndEdition", "rating": "4.5", "coverType": "paperback", "genre": "ComputerScience", "author": "JonBentley“ } }
User Interface jQuery PHP JSON HTML Client Side Scripting Send an AJAX request to PHP Server Side Scripting Send command to AMI and handle returning value Javascript Object Notation Wrap returning data in JSON Create Web Page Parse JSON using jQuery and render web page
Core Component : AMI • PHP-AMI-CLASS, a PHP class for Asterisk Manager Interface • Access AMI with simple AIPs • Available on GitHub
Core Component JSON Asterisk AMI PHP Javascript Object Notation Wrap returning data in JSON VoIP Server Provide WebRTC service through WebSocket Asterisk Manager Interface Control Asterisk by reading or sending command to AMI Server Side Scripting Send command to AMI and handle returning value
Traditional Service Brand New Social Chat • Fill lots of informations before make the call • Login with a Facebook account, no more input
Cross Platform Chat Everywhere The system write with native APIs, don’t need to worry about support of other browsers and OSes.
Advantage No More Registration Login with Facebook account No Plugin Needed Native WebRTC support Chat Everywhere Cross-platform
References [1] www.voip-info.org/wiki/view/Asterisk+manager+API [2] www.oschina.net/question/100267_61459 [3] wikipedia.org/JSON [4] stackoverflow.com/questions/8567114/how-to-make-an-ajax-call-without-jquery [5] wikipedia.org/wiki/Jquery