Transcript Asterisk
Asterisk
The Open Source PBX & Telephony
Platform
Topics
•
•
•
•
•
•
•
•
Basic Telephony terms
VOIP Protocols (relevant ones)
Asterisk info
How to control and change settings
Configuration files
Live demo
Set up your soft phone
Set up Grandstream SIP Phone
Terms
• PBX - Private Branch Exchange
– The control center for a phone system
– Also called a switch or switchboard
• PSTN - Public Switched Telephone
Network
• POTS - Plain Old Telephone System
– Uses 48 VDC for passing analog voice
– Rings at around 90-100 VAC
Terms
• DTMF - Dual Tone Multi Frequency
– Tones used to dial and send signals to the
switch
– Inband
• Uses same frequencies we talk with
• Some peoples voices can trigger this (mostly
females)
– rfc2833
• Out of band standard for passing dialing tones
Terms
• FXS - term used with POTS for a system
that supplies voltage for dial tone and ring
voltage
• FXO - term used with POTS that connects
to an FXS system. Your telephone is FXO.
(These are mixed up a lot)
Terms
• Softphone - software phone that runs on
your computer
• Hardphone - Hardware phone
• VOIP - Voice Over the Internet Protocol
– Generic Term for all IP telephony
• Skype
• Ventrilo
• Teamspeak
– As far as I know always uses UDP/IP. Can use
TCP/IP but why?
Terms - Protocols
• SIP - Session Initiation Protocol
– Used to set up the VOIP call
– Only sets up the connection
– Passes voice packets off to RTP
• RTP - Real-time Transport Protocol
– Carries the voice packets for a SIP phone call
– Issues with NAT (uses different ports than SIP)
Terms - Protocols
• IAX - Intra Asterisk Exchange
– Designed by Asterisk
– Uses same port for both connection and voice packets
so better through NAT
• DUNDi - Distributed Universal Number
Discovery
– Just put in here because sample .conf files have
code for it.
– New protocol NOT universaly used but supported
by Asterisk
The Last Mile
• The last mile is the term used to describe
how the telephone company gets the signal
to your home or office.
• Typically POTS
• Ironic as they convert everything to digital
from that point and send it down the trunk.
Asterisk
• Open Source (*nix only, but windows
bransh avalable)
• Current Version 1.4.21.2
• Version 1.6 RC6 is out
• Code base controlled by Digium Inc.
• Can run on a headless system
• Business model is give away the software
and sell the hardware.
Asterisk Control
• Command line and .conf files
–
–
–
–
/etc/asterisk except zaptell.conf which is in /etc
More on .conf files later
If you like emacs, vi or the like enjoy
You need to know the Asterisk syntax and
settings
– There are alternatives…..
Asterisk Control
• GUI tools
– Asterisk GUI
•
•
•
•
Web based AJAX
Edits .conf files directly
Same UI as AsteriskNOW (more later)
Says can edit .conf files manualy or use GUI and
will not have problems (WRONG)
• Does not use Apache, has own web server
• /etc/asterisk/http.conf holds settings
Other Free PBXs
• OpenPBX by VMX
– Not the same as CallWeaver
• CallWeaver - formerly OpenPBX.org
Asterisk Control
• GUI Tools (cont)
– AsteriskNOW
• From Digium
• Self installing with OS, Asterisk, and GUI
• Wipes out ALL hard drives on the machine
– Trixbox
• Similar to AsteriskNOW but has better UI
Configuration Files
• Only going to mention the most used
–
–
–
–
–
–
–
–
–
–
extensions.conf
Sip.conf
Iax.conf
Users.conf
Manager.conf
Logger.conf
Voicemail.conf
Asterisk.conf
Manager.conf
Zaptel.conf
Configuration Files
• extensions.conf
– Holds the Dial Plan
– Most complex to set up
– Context
• [incoming]
Code here
• [general]
– Has some settings
• [globals]
– Holds global variable info
Configuration Files
• extensions.conf (cont)
– Funky syntax
• exten => (extension) a unique series of steps
• exten => extension, series number, application
– Exten => 123, 1, Answer()
exten => 123, n, Wait(2)
exten => 123, n, Background(tt-weasles)
exten => 123, n, Hangup()
Configuration Files
• extensions.conf (cont)
– Include
• Include = name of another context
• Include = [default]
– Macros
• Used to create reusable code
• Can accept paramaters
Configuration Files
• asterisk.conf
– Tell Asterisk where thing are located
• Log files
• Run directory
– Set verbosity of console
– Turn debug on
– System limits (max calls)
Configuration Files
• features.conf
– Mostly for parked calls settings
• http.conf
– Setting for the Asterisk GUI web server
• rtp.conf
– Limit the ports RTP can use
Configuration Files
• iax.conf and sip.conf
– Settings for connections
– sip.conf for sip connections, ias.conf well you
get it
– Not used with GUIs, users.conf holds all that
data
– Contexts like in extensions.conf
• [101] will be phone extension 101
• All settings for that user under that context
Configuration Files
• zaptel.conf
– Used to set up hardware for connecting your
Asterisk system to POTS, either in or out.
– I did not use this so can’t help here
• manager.conf
– Settings for the Asterisk GUI
•
•
•
•
Turn it on or off
Timeout
Password and user
Amount of control the GUI has
Configuration Files
• logger.conf
– Name of log files
– What to log
• voicemail.conf
– Turn on voicemail for a user
– What capabilities the user has in VM
Configuration Files
• users.conf
– Combines most of iax.conf, sip.conf,
zaptel.conf, and voicemail.conf into one file.
– Changed in later releases to make management
easier
– Uses contexts again like in sip.conf and
iax.conf
– Will show an example later
Phones
• Hardphones
– Grandstream BT200 inexpensive (about $50)
•
•
•
•
•
Only has 7 segment display so not caller ID name only number
Having problems with staying connected to Asterisk
Set up TFTP to set up firmware and ring tones for the phones
Use SIP
100bTx in and out
– Grandstream HT503
• Multi use device
–
–
–
–
–
FXO to FXS
FXO to SIP
FXS to SIP
FXS to FXO
One 100bTx in and out
Phones
• Soft phones - program that runs on a
computer
– Xlite SIP (my favorite)
– Zoiper - IAX
Resources
• Asterisk, The Future of Telephone, 2nd ed.
– O’Reily Publishing
– Free PDF download from asterisk.org
– Keep in mine this book does not talk about users.conf
•
•
•
•
•
voip-info.org
asterisk.org
trixbox.org
asterisktutorials.com
I found a web site from a San Diego company that
had great Trixbox tutorials but alas I can’t find it
now.