Transcript Document

November 3-5, 2004
Santa Clara Convention Center
An Introduction to the
Asterisk Open Source PBX
Presented by:
Gregory Boehnlein
Vice President of
N2Net, A New Age
Consulting Service,
Inc. Company
November 3-5, 2004
Santa Clara Convention Center
Hello Class!
November 3-5, 2004
Santa Clara Convention Center
Contact Information
Email: [email protected]
IRC: Damin on irc.freenode.org
#asterisk
Feel free to personally ask me
questions or drop me an Email
November 3-5, 2004
Santa Clara Convention Center
A Little About Me
• I was born to a family of
Orangutans in the Jungles of
Borneo
• Co-Owner of N2Net, a provider of
Mission Critical Hosting
Services in Cleveland, Ohio
celebrating our 10th
anniversary
• Active Open-Source Developer and
Activist w/ interest in the
Linux and Asterisk
development communities
November 3-5, 2004
Santa Clara Convention Center
A Little About Me
• Asterisk Developer and Bug
Marshall
• Primary Maintainer of the AstWind
(Asterisk on Windows
Project, and no, I’m not
kidding)
• Maintainer of Legacy RedHat
Asterisk RPMS
•I use Asterisk every day, both at
Work and at Home
November 3-5, 2004
Santa Clara Convention Center
Scary Resemblance, Isn’t It?
November 3-5, 2004
Santa Clara Convention Center
Summary
1.
2.
3.
4.
Introduction to VoIP
Introduction to Asterisk
Wrap Up
Questions
November 3-5, 2004
Santa Clara Convention Center
An Introduction to VoIP
What is VoIP?
• Voice Over IP
– Sending Voice over Internet Protocol
• How VoIP works
– Continuously sample analog audio (20 ms)
– Convert audio into to a digital signaling format or codec
– Send digitized stream across the Network as IP
packets
– Decode the stream to analog for playback
November 3-5, 2004
Santa Clara Convention Center
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
November 3-5, 2004
Santa Clara Convention Center
VoIP Hardware 101
• Proxy = Connects Endpoints Together
• Registrar = Authenticates Users
• Media Gateway = Translates between the PTSN and
Packet Networks
• Application Server = Think Webserver
• ATA = Analog Telephony Adapter
November 3-5, 2004
Santa Clara Convention Center
Why is VoIP Relevant to Consumers?
• The Great Myth
– “If I switch to VoIP I’ll get Free Long Distance”
– Don’t Believe the Hype
• The Reality
– Trade off of Quality and Reliability for Features
– Portability / Flexibility
– Cost Effectiveness
– More Choice and Control
– Every Dollar spent on VoIP goes further
November 3-5, 2004
Santa Clara Convention Center
Why is VoIP Relevant to Your
Business?
• New Revenue Streams
– Internet Telephony Service Provider
– Managed Voice Applications and Services
– Disaster Recovery for Traditional PBX
– Hosted PBX Services
November 3-5, 2004
Santa Clara Convention Center
Why is VoIP Relevant to Your Business?
• Convergence is happening all around you
• There are implementation, management and
maintenance opportunities for consulting
companies.
• In 3 years, traditional PBX and Telephone systems
will be a thing of the past
• Easy Target - Customers are being saturated w/
VoIP Advertising from the likes of Vonage
• If you don’t provide the service to them, then
someone else will
November 3-5, 2004
Santa Clara Convention Center
There Has To Be A Catch
• VoIP vs. VoPI
– Voice over Public Internet is uncontrollable once
it leaves your network
• FCC E911 Requirements (As of 5/19/2005)
– Must deliver to correct 911 PSAP no matter
what, where and how
– Ridiculously vague and short sighted
• Customer Expectations
– Extremely High
– The traditional PSTN “just works”
– Can’t figure out the “Send” button
November 3-5, 2004
Santa Clara Convention Center
There Has To Be A Catch
• Competition from the RBOCS and the LECS
– Do you really expect Ma Bell to sit idle while
ITSPs siphon off their revenue streams?
– Virtually unlimited budgets
– Lobbying activities in Washington
• YOU DO NOT OWN THE LAST MILE!!!
November 3-5, 2004
Santa Clara Convention Center
An Introduction to Asterisk
November 3-5, 2004
Santa Clara Convention Center
What Is Asterisk?
When: 1999
This guy, right here!
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.”
November 3-5, 2004
Santa Clara Convention Center
What Is Asterisk?
• 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.
November 3-5, 2004
Santa Clara Convention Center
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
November 3-5, 2004
Santa Clara Convention Center
Licensing Model
• Released and developed under GPL, but Digium
retains rights to code-base
• All developers submit disclaimers to their code
before patches are accepted, allowing for
Digium to license specific branches for
Commercial projects
• This dual-licensing allows companies to purchase
license rights to snapshots of the Asterisk
codebase to be used in commercial, non-gpl
products
November 3-5, 2004
Santa Clara Convention Center
Who Is Digium
From Wikipedia, the free encyclopedia.
Digium is the primary developer and sponsor of
Asterisk™, The Open Source PBX. Digium offers a
variety of specially designed low and high density
telephony hardware and professional services
related to Asterisk. The company is based in
Huntsville, Alabama. Digium sells telephony
hardware and provides contract services for
operating IP based telephony solutions.
November 3-5, 2004
Santa Clara Convention Center
Real World Applications
•
•
•
•
•
•
•
•
•
•
Key System or PBX Replacement
Voicemail Server
Conferencing Server
Call Center ACD Queue
SIP/H323/MGCP Endpoint for IP Phones
Confound and Confuse Telemarketers
Prank Friends with Random Sound Files
Calling Card Application
Predictive Dialer
Home Answering Machine
November 3-5, 2004
Santa Clara Convention Center
The Asterisk Development Model
November 3-5, 2004
Santa Clara Convention Center
The Asterisk Development Model
November 3-5, 2004
Santa Clara Convention Center
Which is remarkably
similar to……
November 3-5, 2004
Santa Clara Convention Center
The Linux Development Model
November 3-5, 2004
Santa Clara Convention Center
The Asterisk Development Model
•
•
•
•
•
•
•
•
•
•
Similar to Linux
Mark Spencer == Linus Torvalds
Core developers with CVS commit rights
1.0 – EOL (Serious Bug Fixes Only)
1.2 – Trunk managed by Drumkilla (Russel Bryant)
Digium employs a handful of full-time developers
to just work on the code
Community Supported
Asterisk-dev Mailing list
Weekly Developer Conferences
Held Online Using a “Meet-Me” Bridge
November 3-5, 2004
Santa Clara Convention Center
High Level Overview of a Developer’s
Conference
November 3-5, 2004
Santa Clara Convention Center
Meet the Developers
These guys, right here!
November 3-5, 2004
Santa Clara Convention Center
Under The Hood
November 3-5, 2004
Santa Clara Convention Center
Under The Hood
• Modular architecture like Linux kernel or Apache
• Console Interface for debugging / status
• Most components can be loaded and unloaded from
the CLI
• Configuration of system is flexible;
– Traditionally using Text Files (/etc/asterisk/ directory)
– 1.2 provides Real-Time Configuration w/ Database
Backend
November 3-5, 2004
Santa Clara Convention Center
The Channel API
• Channel API Interfaces w/ Hard/Software
– Zap – Zaptel Channel Driver
• Digium TDM Cards
• Zapata Telephony Project Designs
– IAX2 – InterAsterisk eXchange Protocol Version 2
• Extremely efficient, very simple, voice optimized protocol
• Can transport up to 3x as many calls per Megabit than SIP
– SIP – Strives to maintain RFC 3261 compatibility
• Communicates with SIP Gateways / Phones
• Probably the most compatible SIP stack out there despite the
overwhelming complexity of the code
– H323 – Based on OpenH323
• Communicates with H323 Gateways / Phones
November 3-5, 2004
Santa Clara Convention Center
The Channel API
• Channel API Interfaces w/ Hard/Software
– MGCP – Media Gateway Control Protocol
• Communicates with MGCP Gateways / Phones
– SCCP – Cisco Proprietary Skinny Control Protocol
• Communicates with Cisco SCCP Equipment
– OSS – Open Sound System
• Older Linux Sound Drivers
• Communicates with Soundcards
– ALSA – Advanced Linux Sound Architecture
• New Linux Sound Drivers
• Communicated with Soundcards
November 3-5, 2004
Santa Clara Convention Center
The Codec Translation API
• Codec Translation API Converts Audio Codecs
– G.711 Ulaw/Alaw
• Ulaw is used in the states, Alaw in Europe
– G.726 32Kbps
– G.729
• Requires a license ($10 / channel from Digium)
• Most widely deployed, low bandwidth codec (8kbps)
–
–
–
–
GSM
iLBC
LPC10 (not recommended!)
Speex
• Open Source, Royalty Free, configurable 4-48kbps, VBR, ABR
November 3-5, 2004
Santa Clara Convention Center
The File Format API
• This API Allows Reading/Writing of Various File Formats
– Some applications may need to archive digital audio streams in
different formats
– Used by many applications such as VoiceMail, which records
messages to disk in whatever format you choose
– Available Formats
•
•
•
•
WAV
MP3
AU
GSM
November 3-5, 2004
Santa Clara Convention Center
The Application API
• Applications Perform Functions
– Modules of code that are used by the Dial Plan
– For Example:
•
•
•
•
•
•
•
•
•
•
•
•
Answer: Answer a channel if ringing
BackGround: Play a file while awaiting DTMF tones
Busy: Indicate busy condition (normal busy)
Congestion: Indicate congestion (fast busy)
Dial: Place a call and connect to the current channel
Directory: Provide directory of voicemail extensions
MeetMe: MeetMe conference bridge
MP3Player: Play an MP3 file or stream
MusicOnHold: Play Music On Hold indefinitely
Record: Record to a file
VoiceMail: Leave a voicemail message
VoiceMailMain: Enter voicemail system
November 3-5, 2004
Santa Clara Convention Center
The Application API
• Simple Dial Plan Example
– Dial 216-920-3111 w/ your Cell Phone to hear it live
; CallerID
exten =>
exten =>
exten =>
exten =>
exten =>
exten =>
exten =>
exten =>
exten =>
Identify
2169203111,1,Answer
2169203111,2,Wait(2)
2169203111,3,Playback(channel-insecure-warn)
2169203111,4,SayDigits(${CALLERIDNUM})
2169203111,5,Wait(1)
2169203111,6,SayDigits(${CALLERIDNUM})
2169203111,7,Wait(1)
2169203111,8,Playback(goodbye)
2169203111,9,Hangup
November 3-5, 2004
Santa Clara Convention Center
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>
November 3-5, 2004
Santa Clara Convention Center
API Access
• C API
• Accessible via standard ANSI C
• Pre-existing example code for applications,
channel drivers etc..
• Forms the Core of Asterisk
• Well documented, just read the code ;)
November 3-5, 2004
Santa Clara Convention Center
res_perl
• Similar to mod_perl for Apache
– Single Perl interpreter is loaded and used to
process requests
– Allows embedding of perl commands directly
in Dial Plan
– For the more adventurous, can be used to
extend Asterisk to unimaginable tasks
– Available as part of the asterisk_addons
package from CVS
November 3-5, 2004
Santa Clara Convention Center
res_js
• Similar to res_perl, except for Javascript
• Available from
http://www.pbxfreeware.org
November 3-5, 2004
Santa Clara Convention Center
AGI
• Asterisk Gateway Interface
– Similar to CGI
– Write in whatever you want (Perl, PHP,
Python, Pascal, Java, BASH… )
– Variables are passed on StdIn to your
Applications, results and commands are
passed back on StdOut
– Included w/ Asterisk, no additional work
required
November 3-5, 2004
Santa Clara Convention Center
Manager API
• Allows client/server interaction over
TCP/IP sockets w/ authentication
• Can be used to issue commands or
monitor PBX events
• Used by applications such as the Flash
Operator Panel and IP Switchboard
November 3-5, 2004
Santa Clara Convention Center
Pre-Recorded Prompts
• Hundreds of professionally recorded prompts
• Recorded by Allison Smith, a Voice Over Professional
– http://www.theivrvoice.com
– Clients include;
•
•
•
•
•
Target
Bell Canada
Volkswagen
Cingular
Victoria Secret
• Can do custom work hourly or using a credit system
• For more information visit: http://thevoice.digium.com
November 3-5, 2004
Santa Clara Convention Center
Connecting Asterisk To The World
•
•
•
•
•
•
Many, Many Options..
TDM Cards from Digium
VoIP Softphones
VoIP Hardware from Various Vendors
VoIP Termination / Origination Service from Carriers
The “ITSP” Internet Telephony Service Provider
November 3-5, 2004
Santa Clara Convention Center
TDM Hardware from Digium
X100P
TDM400
November 3-5, 2004
Santa Clara Convention Center
TDM Hardware from Digium
T100P
TE405P
November 3-5, 2004
Santa Clara Convention Center
TDM Hardware from Digium
DS3000P
S100 IAXY
November 3-5, 2004
Santa Clara Convention Center
Analog Telephony Adapters
Linksys PAP-NA2
November 3-5, 2004
Santa Clara Convention Center
SIP Hardware Phones
Cisco 7960
Polycom IP-600
November 3-5, 2004
Santa Clara Convention Center
IAX2 Software Phones
Firefly
IAXPhone
November 3-5, 2004
Santa Clara Convention Center
SIP Software Phones
Xlite
November 3-5, 2004
Santa Clara Convention Center
Where To Go For More Information
•
•
•
•
•
•
Digium Website at http://www.digium.com
Asterisk Website at http://www.asterisk.org
Asterisk Docs Project at http://www.asteriskdocs.org
VoIP Info Wiki at http://www.voip-info.org
Bug Tracker at http://bugs.digium.com
#asterisk on irc.freenode.org
November 3-5, 2004
Santa Clara Convention Center
How You Can Help
•
•
•
•
•
•
Get Involved
Try it out
Report Bugs
Make Suggestions
Submit Patches
Help Review, Revise Documentation
November 3-5, 2004
Santa Clara Convention Center
Contact Information
Email: [email protected]
IRC: Damin on irc.freenode.org
#asterisk
Feel free to personally ask me
questions or drop me an Email
(Thanks for Listening!)