Presentation is loading. Please wait.

Presentation is loading. Please wait.

An Introduction to the Asterisk Open Source PBX. Enter VoIP …. The packetisation and transport of classic public switched telephone system audio over.

Similar presentations


Presentation on theme: "An Introduction to the Asterisk Open Source PBX. Enter VoIP …. The packetisation and transport of classic public switched telephone system audio over."— Presentation transcript:

1 An Introduction to the Asterisk Open Source PBX

2 Enter VoIP …. The packetisation and transport of classic public switched telephone system audio over an IP network. The analog audio stream is encoding in a digital format, with possible compression and filtering, before encapsulating it in IP for transport over LAN/WAN or the public Internet Infrastructure

3 VoIP Building block Calls are CODed to IP or DECoded from IP. CODECS vary in sample size, usually Kbits per second Decoding can include echo cancellation Decoding can compensate for jitter IP routers do not need to decode voice passing through them

4 Control Protocols H323 – Complex, multiple flow, ancient Has a large install base Session Initiation Protocol (SIP) New, simple, only sets up RTP streams Cisco Skinny (Proprietary) Allows complete phone customization MGCP (media Gateway Control Protocol) Good but Not widely deployed as SIP IAX (Inter-Asterisk eXchange) Simple, transverses NAT, Compressed

5 Basic VoIP Terminology VoIP = Voice Over Internet Protocol PSTN = Public Switched Telephone Network (AKA Ma Bell, or The Great Satan) Codec = A Digital Signaling Format SIP = Session Initiation Protocol IAX2 = Inter Asterisk Exchange Protocol

6 VoIP Hardware 101 Proxy = Connects Endpoints Together Registrar = Authenticates Users Media Gateway = Translates between the PTSN and Packet Networks Application Server = Think Web server ATA = Analog Telephony Adapter

7 An Introduction to Asterisk

8 When: 1999 Who : Mark Spencer Why : “I needed a phone system and with as small a startup budget as I had for Linux Support Services, I wasn't about to buy one, so building one seemed a logical way to go.” This guy, right here! What Is Asterisk?

9 Officially, Asterisk is an Open Source hybrid TDM and packet voice PBX and IVR platform with ACD functionality. Unofficially, Asterisk is quite possibly the most powerful, flexible, and extensible piece of integrated telecommunications software available. Its name comes from the asterisk symbol, *, which represents a wildcard, matching any filename. Similarly, Asterisk the PBX is designed to interface any piece of telephony hardware or software with any telephony application, seamlessly and consistently.

10 What Is Asterisk? An Open Source Telephony Swiss Army Knife A Linux Based PBX w/ Minimal Hardware Reqs A Community Driven Development Project A Really, Really Disruptive Technology Asterisk is any call, any time, from anywhere to anywhere else

11 Under The Hood

12 Extensions.conf (Dial Plan) Calls come in on channels and are then handed to the “extensions.conf” file, which is the dial plan Dial plan contains logical sections of matches called ‘Contexts,’ and each channel sends a call into the dial plan with a context name and a dialed number The dial plan then matches (with modified regexp’s) the number being dialed, and runs applications accordingly Each match on the dialed number has an order of steps called ‘Priorities’, and are indicated with an integral incrementing number (BASIC-like)

13 The Application API Simple Dial Plan Example – Dial 216-920-3111 w/ your Cell Phone to hear it live ; CallerID Identify exten => 2169203111,1,Answer exten => 2169203111,2,Wait(2) exten => 2169203111,3,Playback(channel-insecure-warn) exten => 2169203111,4,SayDigits(${CALLERIDNUM}) exten => 2169203111,5,Wait(1) exten => 2169203111,6,SayDigits(${CALLERIDNUM}) exten => 2169203111,7,Wait(1) exten => 2169203111,8,Playback(goodbye) exten => 2169203111,9,Hangup

14 Console Output -- Executing Answer("Zap/1-1", "") in new stack -- Accepting call from '2164114184' to '2169203111' on channel 0/1, span 1 -- Executing Wait("Zap/1-1", "2") in new stack -- Executing Playback("Zap/1-1", "channel-insecure-warn") in new stack -- Playing 'channel-insecure-warn' (language 'en') -- Executing SayDigits("Zap/1-1", "2164114184") in new stack -- Executing Wait("Zap/1-1", "1") in new stack -- Executing SayDigits("Zap/1-1", "2164114184") in new stack -- Executing Wait("Zap/1-1", "1") in new stack -- Executing Playback("Zap/1-1", "goodbye") in new stack -- Playing 'goodbye' (language 'en') -- Executing Hangup("Zap/1-1", "") in new stack == Spawn extension (inbound, 2169203111, 9) exited non-zero on 'Zap/1-1' -- Hungup 'Zap/1-1' asterisk*CLI>

15 Connecting Asterisk To The World Many, Many Options.. TDM Cards from Digium VoIP Soft phones VoIP Hardware from Various Vendors VoIP Termination / Origination Service from Carriers The “ITSP” Internet Telephony Service Provider

16 TDM Hardware from Digium TE122PFTDM400

17 SIP Hardware Phones Cisco 7960 Polycom IP-600

18 SIP Software Phones Xlite

19 Features of SIP SIP is a lightweight, transport-independent, text-based protocol. SIP has the following features: Lightweight, in that SIP has only four methods, reducing complexity Transport-independent, because SIP can be used with UDP, TCP & so on. Text-based, allowing for low overhead SIP is primarily used for VOIP calls

20 Functions of SIP Location of an end point Signal of a desire to communicate Negotiation of session parameters to establish the session And tear down of the session once established.

21 How SIP works SIP user agents: like cell phones, PCs etc. They initiate message writing. SIP Registrar servers: They are databases containing User Agent locations; they send agents IP address information to SIP proxy servers. SIP Proxy servers: accepts session request made by UA and queries SIP registrar server to find recipient UA address. SIP Redirect servers: they help communicating outside the domain

22 Continued..

23 Our user A tries to call user B (1) Domain SIP proxy server now queries Registrar server in the same domain to know about user B’s address (2) Registrar responds with the address (3) SIP proxy server calls B (4) User B responds to SIP proxy (5) SIP proxy answers to User A (6) Now multimedia session is established on RTP protocol (7)

24 More about SIP.. SIP relies on SDP and RTP protocols SIP proxy is a server in a SIP-based IP telephony environment The SIP proxy takes over call control from the terminals and serves as a central repository for address translation (name to IP address)

25 SIP Advantages SIP is a based on HTTP and MIME, which makes it suitable for integrated voice-data applications. SIP is designed for real time transmission. Uses fewer resources. Is less complex than H.323. SIP uses URLs and is human readable.

26 IAX architecture IAX protocol (Inter-Asterisk eXchange protocol) was designed to provide control and transmission of voip data between Asterisk servers. Nowadays it is also used for connections between clients and servers which support the protocol. The present version of IAX is IAX2 since the first version of IAX is obsolete. IAX is a protocol designed and thought for VoIP connections (audio streaming) although it can support another type of data (for example video streaming)

27 The main goals of IAX are: -Minimize bandwidth usage for both control and media transmissions with specific emphasis on individual voice calls -Avoid NAT problems (Network Address Translation) -Support the ability to transmit dialplan information -reduce the bandwidth IAX or IAX2 use a binary protocol instead of a text protocol liToke SIP and that is why the

28 -In order to avoid NAT problems, IAX or IAX2 uses UDP transport protocol, normally on port 4569, (IAX1 used port 5036), and both, signaling information and data go together using the same protocol (unlike SIP) Therefore, IAX has less NAT problems and it can pass through routers and firewalls in a better way.

29 Comparison between SIP and IAX - Bandwidth The bandwidth uses by IAX is less than the one uses by SIP since the messages are binary instead of text messages (SIP). IAX also tries to reduce the headers of the messages reducing therefore the bandwidth used. - NAT Signaling and data travel together in IAX avoiding the problems of NAT that usually appear in SIP. Signaling and data in SIP travel using different protocols and that is why NAT problems appears. Audio stream have to pass through routers and firewalls. SIP usually needs a STUN server to avoid these problems. - Standarization and use SIP is a protocol standardized by the IETF long time ago and it is widely used by the equipment and software manufacturers. IAX is still being standardized and for that reason not many devices can use it nowadays

30 - Ports used IAX uses only one port (4569) to send signalling and data of all the calls. To do it IAX use a trunking system. IAX multiplexes signaling and multiple media streams over a single User Datagram Protocol (UDP). SIP, otherwise, uses one port (5060) for signalling and 2 RTP ports for each audio connection (at least 3 ports). For example, if we have 100 simultaneous calls we should use 200 RTP ports and one port for signalling (5060). IAX uses only one port for everything (4569) - Audio flow when using a server If SIP is using a server signaling messages always pass through the server but audio messages (RTP flow) can travel end to end without passing through the server. In IAX, signaling and data must pass always through IAX server. This increases the bandwidth need by the IAX servers when there are many simultaneous calls.

31 DAHDI Digium Asterisk Hardware Device Interface It is... – A high density kernel telephony interface for PSTN hardware – Abstracts the hardware interface. – A collection of kernel modules to implement this interfaces. It was... – Formerly known as Zaptel.

32 Example system.conf /etc/dahdi/system.conf: # comments from default file skipped ## Configuration for Bell PRI span=1,1,0,esf,b8zs echocanceller=oslec,1-23 bchan=1-23 dchan=24 fxoks=25 fxsks=28

33 Example chan_dahdi.conf /etc/asterisk/chan_dahdi.conf > > [trunkgroups] > > [channels] > context=from-pstn > signalling=fxs_ks > rxwink=300 ; Atlas seems to use long (250ms) winks > usecallerid=yes > hidecallerid=no > callwaiting=yes > usecallingpres=yes > callwaitingcallerid=yes > threewaycalling=yes > transfer=yes > canpark=yes > cancallforward=yes > callreturn=yes > echocancel=yes > echocancelwhenbridged=no > faxdetect=incoming > echotraining=800 > rxgain=0.0 > txgain=0.0 > callgroup=1 > pickupgroup=1

34 Thank You


Download ppt "An Introduction to the Asterisk Open Source PBX. Enter VoIP …. The packetisation and transport of classic public switched telephone system audio over."

Similar presentations


Ads by Google