Upload
ankur-garg
View
219
Download
0
Embed Size (px)
Citation preview
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
1/33
www.convergencetechnologycenter.orgDUE 402356
AsteriskThe Future of Telecommunications
Vincente DIngianniDirector of Professional Services
Binary Systems, Inc.
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
2/33
2www.convergencetechnologycenter.org
What is Asterisk?
Asterisk is a complete VoIP Softswitch, designed toreproduce the features of standard office PBX system.
Asterisk is also a Voice over IP toolkit which allowsinteraction between these PBX features and IP-basednetworks (local and remote.)
Asterisk is hardware independent, and is designed to runon numerous operating systems.
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
3/33
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
4/33
4www.convergencetechnologycenter.org
Proprietary API
Media Gateways / Endpoints
MGCP
PCI Bus Ethernet
SCCPH.323
Asterisk
IAX
EthernetEthernet
SIP
Asterisk Softswitch System Architecture
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
5/33
5www.convergencetechnologycenter.org
Asterisk Capabilities
Telephony gateway (TDM channels - PRI,POTS)
VoIP Gateway (IP channels)
IVR system (Interactive Voice Response)
Voicemail System
Scriptable telephony-to-anything (Perl, C, etc.)
much, much more
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
6/33
6www.convergencetechnologycenter.org
Asterisk is not
A Billing system A CRM system A web server or XML server A configuration tool for VoIP devices A voice recognition system A USENET or email client
but it is often bundled with these subsystems to form a complete solution.
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
7/33
7www.convergencetechnologycenter.org
Asterisk Goals
Provide Open-Source implementations of basic PBXfunctionality
Be vendor neutral (despite last point here) Be as all-encompassing as possible for features Be flexible and provide hooks for advanced features Move proprietary hardware features into open source
software (HMP functionality)
Integrate with 3rd
party telephony hardware devices(DSP functionality)
Sell TDM hardware cards for Digium
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
8/33
8www.convergencetechnologycenter.org
Who is Digium?
Primary supporter of Asterisk development. Owner of the CVS server/bug system/mailing
list boxes/etc.
Approves all patches and features bycommunity Produces TDM cards (Wildcard hardware)
which works particularly well with Asterisk
Owner of the disclaimers for all contributionsto Asterisk, holder of copyright
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
9/33
9www.convergencetechnologycenter.org
Asterisk is not quite GPL
Asterisk is GPL, but with an important clause Digium can license branches of the source such
that those branches are not GPL
Digium gets disclaimers from all contributorssaying that Digium can license branches of thecode.
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
10/33
10www.convergencetechnologycenter.org
VoIP Channels
SIP - Session Initiation Protocol (internal stack) H.323 via OpenH323 Project MGCP - Media Gateway Control Protocol
(internal stack) SCCP Cisco Skinny Protocol (internal stack)
IAX Inter-Asterisk eXcange Protocol Special open-source protocol developed for
communicaiton between Asterisk servers.
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
11/33
11www.convergencetechnologycenter.org
VoIP Channel Endpoints
Phones for VoIP (SIP): Grandstream 102 Cisco ATA 186 Sipura Cisco 7960/7940
Polycom IP-501, IP-601, etc. Snome Many others
Software for VoIP (SIP) www.xten.com - free SIP client (Lite) gnophone.com - Linux SIP client Windows Messenger
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
12/33
12www.convergencetechnologycenter.org
TDM and Other Channels
TDM POTS cards (Digium, Zapata, Voicetronix, etc.) TDM Digital (AdTran VoFR, Digium E1/T1, etc.)
All TDM cards require install of Zaptel driver suite
CAPI (ISDN card support for Linux ISDN driver) USB dongle for FXS Modem drivers for certain modems
Speaker/headphones
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
13/33
13www.convergencetechnologycenter.org
System Requirements
No clear rule of thumb on processor size; at least 500 MHzPIII recommended. Almost any version of Linux is supported. Source & binaries (including sounds) are ~35 MB
Using complex codecs (i.e.: G.729, Speex, etc.) will increaseprocessor load dramatically Remember this is processed on the host processor HMP
Best to have a > 1.5 GHz machine for multi-channel use.
Mac OS X / FreeBSD is becoming stable for non-hardwarechannels.
VMWare and Parallels Virtual Machines
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
14/33
14www.convergencetechnologycenter.org
Call Flow (briefly)
Calls come in on channels and are then handed to theextensions.conf file, which is the dialplan
Dialplan contains logical sections of matches called Contexts,
and each channel sends a call into the dialplan with a contextname and a dialed number.
The dialplan then matches (with modified regexps) the numberbeing dialed, and runs applications accordingly
Each match on the dialed number has an order of steps calledPriorities, and are indicated with an integral incrementingnumber.
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
15/33
15www.convergencetechnologycenter.org
Regular Expressions (briefly)
All regular expressions start with _ character in dialexaminations.
X means any number, N is any number other than0 or 1
. means any number of characters Brackets represent groups, with standard - and ,
meanings ([1-9] or [0,1,2]) Example: _1410985012X is the same as
_1410985012[0-9]
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
16/33
16www.convergencetechnologycenter.org
Call Flow (contd)
[from-my-pri]
exten => 14109850123,1,Answer
exten => 14109850123,2,Wait(2)
exten => 14109850123,3,Playback(monkeys)exten => 14109850123,4,Goto(more-monkeys,123,1)
[more-monkeys]
exten => _12X,1,Playback(sorry-no-more-monkeys)exten => _12X,2,Hangup
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
17/33
17www.convergencetechnologycenter.org
Redirection based on ANI
You can match against calling numberinstead of called number.
This is known as The ex-girlfriend filter by
the inventor of the routines This pattern matches against called number
(1410) and also against calling numer (301)
exten => 14109850123/3013659999,1,Busy
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
18/33
18www.convergencetechnologycenter.org
Redirection of Call Flow
GotoIf - can parse basic Booleans GotoIfTime - handy way to deal with time-based
redirection
Some applications will add 101 to the existingpriority when certain errors occur (notably, Dialdoes this on busy, and DBget/DBput do this onerrors reading from the internal database)
Any other type of errors result in channelhangup
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
19/33
19www.convergencetechnologycenter.org
Variables
${VARNAME} is how variables are used Variables must be declared before Booleans
can be performed
Variables can be nested during settingexten => 123,1,SetVar(BAR=blah)
exten => 123,2,SetVar(FOO=3)
exten => 123,3,SetVar(NEWVAR.${FOO} = ${BAR})
This results in ${NEWVAR.3} being set to
blah
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
20/33
20www.convergencetechnologycenter.org
Special Variables
${EXTEN} - always the most importantvariable. This is the number that is beingcurrently evaluated.
${CALLERIDNUM} - the ANI (if available) ofthe call leg that is creating the call Some others, less used: ${EPOCH}, $
{ENV(var)}, ${CONTEXT}, ${PRIORITY},
several other descriptors of the call leg wereprocessing
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
21/33
21www.convergencetechnologycenter.org
Some Applications
Dial - connects an inbound call with someother channel.
The first argument specifies the technology
(SIP, Zap, H323, etc.) and the number to bedialed, the Ring-No-Answer delay, andoptions (if desired)
exten => 1234,1,Dial(SIP/1234,25)exten => 1234,2,Voicemail2(u1234)
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
22/33
22www.convergencetechnologycenter.org
Some Applications (contd)
Playback(filename) Plays a sound file in .gsm format
Background(filename) Plays a sound file while listening for DTMF (touch
tone) input
[test]
exten => 123,1,Background(press-a-number)
exten => 123,2,Goto(1)exten => _X,1,SayDigits(${EXTEN})
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
23/33
23www.convergencetechnologycenter.org
Some Applications (contd)
MeetMe(conf#) Adds the caller to a conference room (optionally
muted or unmuted)
Monitor Records channel (in and out) to .wav or .gsm files
PrivacyManager
Forces anonymous calls to enter valid ANI
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
24/33
24www.convergencetechnologycenter.org
Some Applications (contd)
DISA Lets callers from one channel get dialtone on
another channel
SetMusicOnHold You can specify .mp3 files as music on hold
selections (random or sequential)
MP3Player Fairly useless, but fun. You can specify files or
streams of .mp3 to be played to callers.
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
25/33
25www.convergencetechnologycenter.org
Some Applications (contd)
There are over 80 different applications in thesystem more created each day.
Applications are easily created and added if
youre a decent C coder or scripting coder. Channels are generic, so you dont have to
know about any of the ugly VoIP or TDM
stuff.
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
26/33
26www.convergencetechnologycenter.org
Voicemail
Voicemail can be sent as email as well asstored on disk (1 minute = 100KB)
Short pages can be sent to email addresseswhen VM received
Customizable timezones and time readouts peruser - supports multiple languages
WAV or GSM file format for storage oremail Dial by name directory hinges on VM data
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
27/33
27www.convergencetechnologycenter.org
Practical Uses
Ditch your long distance company! SIP longdistance (domestic and int) providers startingto crop up at low rates. Use Asterisk to
gateway to them. Prevent phone spam! Callers with no CID get
ditched.
Filter your phone lines. Allow or forwardcallers who are on priority lists based onANI.
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
28/33
28www.convergencetechnologycenter.org
Practical Uses
Enterprise-quality SIP connection services are now available.
Interconnect office PBXs at zero network cost Get Unified Messaging Give ubiquitous access to the PBX for home/traveling employees Disaster recovery scenarios Move phones into your IT department and away from your
expensive PBX consulting firm Eliminate adds/moves/changes as physical chores
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
29/33
29www.convergencetechnologycenter.org
Advanced Topics
Call queues - you can build a call center with Asterisk, withvarious call weightings and agent logins/hot seating
Multi-ring, cascading ring with different technologies (inbound
calls forward to your desk line and your cell phone - firstanswer gets it)
Multi-language support with same dialplan
Festival integration for voice synthesis
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
30/33
30www.convergencetechnologycenter.org
Really Advanced Topics
Manager interface: TCP socket based interface forcontrolling and monitoring the system; meant forautomated manager tools (see: gastman)
AGI scripts: built-in scriptable hooks to allow passingof data back and forth between Asterisk and externalprograms.
Asterisk.pm - Perl module that works with AGI tohandle grunt work of call handling
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
31/33
31www.convergencetechnologycenter.org
Really Advanced Topics (cont)
Sybase and MySQL modules
CDR (call detail record) output can be customized orput into database instead of flat file
Use IAX2 trunk mode to get up to 200% more calls inthe same bandwidth as other VoIP systems
Dynamically Route your calls to least-cost providers
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
32/33
32www.convergencetechnologycenter.org
Other Asterisk Applications
Can run PPP or HDLC over channels Asterisk can be a RAS server or a router
Can use speaker/microphone as a phone line
Video Calls or Conferencing
ENUM e.164 DNS-based call routing
Example: 2.1.2.1.2.5.4.3.0.5.1.e164.arpa.
TDM over ethernet for front-end processing
7/31/2019 02 - Asterisk - The Future of Telecommunications (1)
33/33
33www convergencetechnologycenter org
Asterisk Resources
http://www.asterisk.org/ - Latest Source Code
http://www.digium.com/ - Asterisk TDM hardware
http://www.voip-info.org/ - General VoIP How-To Info
http://www.xten.com/ - Softphone
http://www.asterisk-vonage.com/ - Asterisk to Vonage connectivity
http://www.binary-systems.com/ - Asterisk Consulting & Training Services
http://www.asterisk.org/http://www.digium.com/http://www.voip-info.org/http://www.xten.com/http://www.asterisk-vonage.com/http://www.binary-systems.com/http://www.binary-systems.com/http://www.asterisk-vonage.com/http://www.xten.com/http://www.voip-info.org/http://www.digium.com/http://www.asterisk.org/