asterisk based real-time social chat advisor : lian-jou tsai student : jhe-yu wu

Post on 31-Dec-2015

218 Views

Category:

Documents

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Asterisk based real-time social chat

Advisor : Lian-Jou TsaiStudent : Jhe-Yu Wu

Outline

Motivation

Abstract

Telephony Technology

Application

System Design

Conclusion

Reference

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

PSTNPublic Switched Telephone Network

VoIPVoice over Internet Protocol

Figure 1. The PSTN architecture.

PSTN

VoIP Server

Figure 2. The VoIP architecture.

ApplicationAsterisk & WebRTC

AsteriskAsterisk is a flexible and extensible suite

of integrated telecommunications software.

WebRTCWebRTC (Web Real Time Communication)

is a open project 

that enables web browsers withReal-Time Communications capabilities

via simple JavaScript APIs.

Supported Browsers

System DesignUser interface & Core component

User Interface : jQuery

jQuery is a cross-platform JavaScript library designed to simplify the client-side scripting of HTML.

var xmlhttp;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();

$.ajax({ url: "ajax.php?data=ok", type: "GET", success: function(){ //ok }})

jQuery

JavaScript

User Interface : JSON

JSON is an open standard format that uses human-readable text to transmit data objects consisting of attribute–value pairs.

<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>

{ "book": { "type": "textbook", "pages": "256", "title": "Programming Pearls 2nd Edition", "rating": "4.5", "coverType": "paperback", "genre": "Computer Science", "author": "Jon Bentley“ } }

XML

JSON

HTMLJSONPHPjQuery

Create Web Page

Parse JSON using jQuery and render web

page

Server Side Scripting

Send command to AMI and handle returning

value

Javascript Object Notation

Wrap returning data in JSON

Client Side Scripting

Send an AJAX request to PHP

User Interface

Core Component : AMI

PHP-AMI-CLASS, a PHP class for Asterisk Manager Interface

Access AMI with simple AIPs

Available on GitHub

PHPAMIAsteris

kJSON

Server Side Scripting

Send command to AMI and handle returning

value

VoIP Server

Provide WebRTC service through

WebSocket

Asterisk Manager Interface

Control Asterisk by reading or sending command to AMI

Javascript Object Notation

Wrap returning data in JSON

Core Component

Traditional Service

Fill lots of informations before make the call Login with a Facebook account, no more input

Brand New Social Chat

Simple User Interface

Cross Platform

Chat EverywhereThe system write with native APIs, don’t need to worry about support of other browsers and OSes.

Chat EverywhereCross-platform

No More RegistrationLogin with Facebook account

No Plugin NeededNative WebRTC support

Advantage

[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

References

Thanks for your patient

top related