Presentation is loading. Please wait.

Presentation is loading. Please wait.

Asterisk PBX: VoIP’s gateway to the future By Alex Ayala For Telecom class of 2003.

Similar presentations


Presentation on theme: "Asterisk PBX: VoIP’s gateway to the future By Alex Ayala For Telecom class of 2003."— Presentation transcript:

1 Asterisk PBX: VoIP’s gateway to the future By Alex Ayala For Telecom class of 2003

2 Agenda Introduction to VoIP Benefits Challenges CODECS Session Initiation Protocol Asterisk PBX Demonstration

3 What is VoIP? Based on packet switching technology using Internet as transport Opposed to the traditional circuit switching technology, which dominates the Public Switched Telephone Network (PSTN) Driven by low cost; flat-rate billing So why haven’t we switch to VoIP??

4 VoIP: Benefits Integration of Data & Voice Simplification Less equipment management Network Efficiently Save on Bandwidth (silence suppression) Cost Reduction Bypass PSTN toll fees

5 VoIP: Challenges 3 main factors affect the quality of voice Latency Jitter Packet Loss If cost is the only criteria Managers/Administration would be only ones who wouldn’t mind bad voice quality. Employees won’t compromise quality to reduce company’s bills.

6 VoIP: Quality of Voice Quality of CODEC give good quality low delay Echo cancellation 2 wire -> 4 wire PBX (hybrid circuit used for conversion) if delay > 10mS echo is notice Delay Total Delay ( > 200mS one-way; talkers overlap ) Jitter ( variable packet arrival ) Delay Management Prioritize (RSVP) Packet replay (Jitter buffer) Segmenting data packets (exit router faster)

7 VoIP: CODECS Overview of a VoIP connection: Codecs supported by * G.723 – 6.4kbps G.729 – 8kbps G.711 – 64kbps

8 VoIP: Protocols RSVP (Resource ReSerVation Protocol) RTP (Real Time Protocol) RTCP (Real Time Control Protocol) SIP (Session Initiation Protocol) SDP (Session Description Protocol)

9 VoIP: SIP Addressing Uses Internet URLs Supports both Internet and PSTN addresses General form is name@domain To complete a call, needs to be resolved down to User@Host Examples: sip: alex@pbx.ayalanetworks.com sip:Alex Home sip:905-845-9430@pbx.ayalanetworks.com;user=phone sip:guest@drkangel.org

10 VoIP: SIP Call Setup 200 OK ACK INVITE sip:3004@pbx.ayalanetworks.com 142.55.55.202pbx.ayalanetworks.com SIP User Agent Client SIP User Agent Server BYE 200 OK RTP Stream

11 VoIP: SIP Requests MethodDescription REGISTERUsed by client to register a particular address with the SIP server INVITEA session is being requested to be setup using a specified media ACKMessage from client to indicate that a successful response to an INVITE has been received BYEA call is being released by either party CANCELCancels any pending requests. Usually sent to a Proxy Server to cancel searches OPTIONSA Query to a server about its capabilities Example: INVITE

12 VoIP: SIP REGISTER Session Initiation Protocol Request line: REGISTER sip:pbx.ayalanetworks.com SIP/2.0 Method: REGISTER Message Header Via: SIP/2.0/UDP 142.55.31.239:5060;rport;branch= From: Alex To: Alex Contact: "Alex Ipaq" Call-ID: @pbx.ayalanetworks.com CSeq: 43034 REGISTER Expires: 1800 Max-Forwards: 70 User-Agent: X-Lite build 1082 Content-Length: 0

13 VoIP: SIP INVITE Session Initiation Protocol Request line: INVITE sip:3004@pbx.ayalanetworks.com SIP/2.0 Message Header Via: SIP/2.0/UDP 142.55.55.202:5060;rport;branch= From: Alex Home ;tag= To: Contact: Call-ID: @142.55.55.202 CSeq: 23277 INVITE Max-Forwards: 70 Content-Type: application/sdp User-Agent: X-Lite build 1088 Proxy-Authorization: Digest username="3001",realm="asterisk",nonce=4c3e876b, response=“ ”,uri="sip:3004@pbx.ayalanetworks.com" Content-Length: 297

14 VoIP: SDP Session Description Protocol Version (v): 0 Owner/Creator, Session Id (o): 3001 173802875 173802875 IN IP4 142.55.55.202 Session Name (s): X-Lite Connection Information (c): IN IP4 142.55.55.202 Time Description, active time (t): 0 0 Media Description, name and address (m): audio 8000 RTP/AVP 0 8 … Media Attribute (a): rtpmap:0 pcmu/8000 Media Attribute (a): rtpmap:8 pcma/8000 Media Attribute (a): rtpmap:3 gsm/8000 Media Attribute (a): rtpmap:98 iLBC/8000 Media Attribute (a): rtpmap:97 speex/8000

15 VoIP: SIP Responses DescriptionExamples 1xx Informational – Request received, continuing to process request. 180 Ringing 100 Trying 2xx Success – Action was successfully received, understood and accepted. 200 OK 3xx Redirection – Further action needs to be taken in order to complete the request. 300 Multiple Choices 302 Moved Temporarily 4xx Client Error – Request contains bad syntax or cannot be fulfilled at this server. 401 Unauthorized 408 Request Timeout 5xx Server Error – Server failed to fulfill an apparently valid request. 503 Service Unavailable 505 Version Not Suported 6xx Global Failure – Request is invalid at any server. 600 Busy Everywhere 603 Decline

16 VoIP: SIP Responses (cont) Required Fields: SIP/2.0 200 OK Via: SIP/2.0/UDP 142.55.55.202:5060 From: Alex Home To: Call-ID: @142.55.55.202 CSeq: 23278 INVITE These are copied from the request corresponding to 200 OK To and From are NOT swapped CSeq is incremented by 1

17 VoIP: SIP Routing VIA headers are used for routing SIP messages Requests Request Initiator puts address in VIA header Responses Response initiator copies request VIA header

18 VoIP: SIP Security ENCRYPTION SIP offers various approaches End 2 end encryption Hob by hop encryption AUTHENTICATION Proxies might require auth Responds to INVITE with 407 proxy auth req. Client re-INVITE with Proxy Authorization header UAS/Registrars might require auth Responds to INVITE with 401 unauthorize Client re-INVITE with Authorization header

19 Asterisk:What is it? A complete PBX software for Linux platform developed by Digium (M.S.) Does PBX call switching, CODEC translation, and various applications Open Source under GNU license

20 Asterisk: Applications Voicemail Dial an interface (ZAP, SIP, IAX, etc) Conference Bridging ACD Queues (great for Call centres) IVR ( press “1” if you know the ext) DB operations ENUMlookup AGI (asterisk gateway interface, like CGI) For advance scripting

21 Asterisk: Overview

22 Asterisk: Call Logic Asterisk uses a State Machine to determine what to do with a Call Context : The Origin of the call (SIP, PSTN, etc) Extension: The number Dialed by user Priority: A counter that orders a sequence of commands

23 Asterisk: Call Logic Example A user dials 3001, which is extension for Voicemail Central. The user is define in context => local extensions.conf [local] exten => 3001,1,Voicemailmain2 A sip user (4001) dials 1001 which is an analog phone (Zap/1), and drop in voicemail if unavailable (no one answers for 30 secs) sip.conf [4001] Username=4001 Context=from-sip … extensions.conf [from-sip] exten => 1001,1,Dial(Zap/1,30 ) exten => 1001,2,Voicemail2(u1001)

24 Asterisk: ENUM A PSTN user wants to call a SIP user? Only have a dialpad. How to dial a URI? ENUM. Creates a global directory which map telephone number to sip address (or email ). DNS lookup (E.164 -> URIs) E.164 queries are formed as reversed dot-separated digits and attach the enum.domain.tld at the end (usualy e164.arpa) 905-845-9430  0.3.4.9.5.4.8.5.0.9.e164.arpa

25 Asterisk: Enum Example

26 Asterisk: IAX Inter-Asterisk eXchange used by Asterisk as an alternative to SIP, H.323, etc Supports PKI-style security and trunking When trunking, it allocates BW in used only Quality is similar to SIP, but as connections increase IAX (in trunk mode) becomes better. Versions: IAX and IAX2

27 Asterisk: IAX (cont) IAX is NAT/PAT transparent IAX2 trunking triples per megabyte 100 calls/MB (with G.729) Over 1000 iaxtel registered users (like FWD)

28 Top Ten Reasons to Run Asterisk

29 Number 10 Convenient, unambiguous single non-alphanumeric abbreviation: *

30 Number 9 Dial-an-MP3

31 Number 8 Can call you 5 minutes into a blind date as 'emergency exit'

32 Number 7 Only way to build a call center on your laptop

33 Number 6 Teleconferencing with your friends allows you to be more lazy/unsocial than you already are

34 Number 5 You can have a 31337 answering machine.

35 Number 4 Finally you can tell telemarketers, “all representatives of our household are busy attending other telemarketers, your call will be answer in order of received”.

36 Number 3 Answer unwanted calls (ex- girlfriend) with a looping IVR “press 1 to speak to Alex…..Invalid option, please try again…”

37 Number 2 Have screaming parents,siblings,etc after they can’t call long distance,…Password protected.

38 Number 1 Why settle for being just another webmaster, hostmaster, or postmaster when you too can be an astmaster like me!

39 Asterisk: Demo 2 Asterisk servers 4 Sip clients, 4 local phones (2 in each server) IAX2 trunk between servers Both will act as sip proxies Server A is connected to PSTN via FXO Using ENUM for least cost routing

40

41 THANK YOU Telecom Class ‘03


Download ppt "Asterisk PBX: VoIP’s gateway to the future By Alex Ayala For Telecom class of 2003."

Similar presentations


Ads by Google