|
Asterisk Support Pages
Asterisk is under continuous development. When we perform a customer implemenatation, we choose a stable
release from the active development stream. For people who like to get their hands dirty with tuning Asterisk,
we offer the following hard won nuggets of knowledge gleaned from the smart contributors
of the Asterisk mailing lists.
Comments below are based upon a Redhat 9 system with minimum of 2.4.20-19.9 kernel.
As of October 1, Asterisk should now be stable on this platform.
Disclaimer: I havn't tried everything mentioned here, so caveat emptor.
Where did Asterisk originate?
Mark Spencer at Digium started the development of Asterisk
as an add-on solution for the range of telephony cards the company offers.
Shorthand
In the mailing lists, you may see Asterisk written simply as '*'.
Searching for Information
Use Google to search for information regarding Asterisk. To search the Asterisk mailing lists
specifically, use 'site:lists.digium.com yoursearchwordshere'.
Channel Banks
Channel banks separate digital T1 lines into individual analog lines.
Ports that you can plug an analog phone into are FXS
ports, and ports you connect lines from the Telco into are FXO ports.
Some Cool Asterisk Tricks
- Using the Digium T1 cards and running both voice and data across a single link.
- Sharing dialling plans between offices by using the IAX2 trunking feature
- Using AGI scripting to add custom functionality
Codec bandwidth utilization over a trunking channel:
Codec Bandwidth
IAX2 & Register Hints
A register directive is only required when one of the servers has
a dynamic IP address which cannot be resolved from the outside or is
behind NAT. The entry on the destination server needs to have "host=dynamic".
A "type=peer" registers with a "type=user" or "type=friend".
IAX2 port is 4569. IAX port is 5036.
Call Pickup
Use *8 to pick up an extension.
in sip.conf, callgroup and pickupgroup are necessary:
[3000]
type=friend
username=3000
secret=mypassword
host=dynamic
context=from-sip
callgroup=2
pickupgroup=2
mailbox=3000
Installation hints (without Digium cards)
Our version of the Redhat KickStart File can be used to prepare a minimal Linux installation. See Redhat's KickStart Configuration
Guide for more information on how to use this file. It is a good idea NOT to install X-Windows, a server type of install is
best.
Make sure you have the following libraries and programs installed:
- libtermcap-devel (may no longer be needed)
- ncurses-devel
- readline-devel (may no longer be needed)
- openssl-devel
- postgresql-devel (for cdr records)
- bison (may no longer be needed)
- newt (may no longer be needed)
- doxygen
- zlib-devel
- kernel source (may no longer be needed)
Obtain the latest version of Asterisk:
- cd /usr/src
- mkdir digium
- cd digium
- svn checkout http://svn.digium.com/svn/asterisk/trunk asterisk
- svn checkout http://svn.digium.com/svn/zaptel/trunk zaptel
- svn checkout http://svn.digium.com/svn/libpri/trunk libpri
Build the low level drivers
- cd /usr/src/digium/zaptel
- edit Makefile and remove the '#' before ztdummy on line 90 if a 2.4 kernel
- make clean
- make install
- make config
- service zaptel start|reload|restart
Build the remaining directories
- cd ../libpri
- make install
- cd ../asterisk
- make install
- make samples
- make progdocs
Configuration files have been created in /etc/asterisk.
To start, run 'asterisk'. To load automatically, put into your /etc/rc.d/rc.local file:
- modprobe ztdummy
- safe_asterisk
Music On Hold
Music On Hold requires MPG. The file that comes with Redhat does not work correctly. To obtain a workable
solution, these steps may help.
# cd /usr/src
# wget http://www.mpg123.de/mpg123/mpg123-0.59r.tar.gz
Extract it and compile:
# tar -zxvf mpg123-0.59r.tar.gz
# cd mpg123-0.59r
# make linux
# make install
once compiled make sure there is a copy in /usr/bin/mpg123
remove symlink to mpg321. then
# cp /usr/local/bin/mpg123 /usr/bin
Update Asterisk from CVS
In each of the three subdirectories, zaptel, libpri, and asterisk, run the following
commands (these commands are obsolete, I have to revise this as SVN is now used):
- make clean
- cvs update
- make
- make install
An alternative for the asterisk directory (the preferred way as it updates the date in
Asterisk's sign on banner):
- make clean
- make update #which automatically connects to CVS
- make install
A message on Oct 24, 2003 indicated that there's a tiny bug around: the current installer forgets to
copy "hours.gsm" to the sounds/digits directory. If you use this in your
voicemail.conf then vm will just hang up on you when it gets to say
"hours"...
Be sure to backup /etc/asterisk and /var/lib/asterisk/sounds before performing an update.
Digium G.729 license issue
Asterisk has an autostart script which would be /etc/rc.d/init.d/asterisk. Make the following modification if
you are having some problems with getting Asterisk to run.
daemon /usr/sbin/asterisk
with
daemon screen -d -m asterisk -vvvcng
Someone indicated that "The G729 codec needs a tty. The safe_asterisk script makes sure a tty
is available for Asterisk."
Eliminating some internationalization errors:
In /etc/sysconfig/i18n, the first line reads something like LANG="en_US.UTF-8". Change it to read LANG="en_US",
and reboot.
Dev Lite Config Notes
ADD TO YOUR rc.local inititialization file:
rmmod usb-uhci
modprobe usb-uhci
modprobe wcfxo
modprobe wcusb
sleep 1
ztcfg -vv
sleep 1
ALSO,
/etc/zaptel.conf should be
fxsks=1
fxoks=2
loadzone = us
defaultzone=us
AND,
/etc/asterisk/zapata.conf
should include something like this:
context=home
signalling=fxs_ks
context=incoming
channel => 1
signalling=fxo_ks
context=outgoing
channel => 2
Festival
Some remarks from Rich Adamson regarding the installation, care, and feeding of Festival, the text to speech
processor are included in this link.
X-Lite Configuration settings
Under System Settings -> Sip Proxy
- Enable: yes
- Username: The name or number in your SIP.CONF [brackets]
- Authorized User: Leave blank (and remark out in SIP.CONF if you have it in
there.)
- Obviously set the password.
- Domain/Realm: The Name or IP of your Asterisk box.
- Sip Proxy: The Name or IP of your Asterisk box.
- Send Internal IP: ON (If Sip phon and asterisk are on the same network)
AGI Scripting
Manager Interface
- Home of Asterisk::AGI which contains
an example manager-test.pl of how to connect to the manager interface.
- Some info at
Digium's Site
- Somewhat broken
example on the list-serve. But does show how to parse the 'status' command.
- Example from 650 DialUp
Outgoing calls
Locate a file called 'sample.call' in the asterisk directory. Modify the file to meet your
call requirement. Then drop it in /var/spool/asterisk/outgoing. Asterisk will make the call for
you.
|