C*NET Hacks
by Russ Price
Last Updated: 2010-01-20
This page provides hacks for Asterisk
that may be useful to members of C*NET,
the Telephone Collector's Net.
Downloads Page
DKMS support for DAHDI
As of version 2.2.1, the modified dahdi-cnet-linux package may be used with DKMS, and will cooperate with
the RPMForge DKMS package. The procedure (assuming version 2.2.1):
cd /usr/src
tar xvfz /path/to/dahdi-cnet-linux-2.2.1.tar.gz
dkms add -m dahdi-cnet-linux -v 2.2.1 -k `uname -r`
dkms build -m dahdi-cnet-linux -v 2.2.1 -k `uname -r`
dkms install -m dahdi-cnet-linux -v 2.2.1 -k `uname -r`
When installed this way, DKMS will make sure that your modules are compiled
(if necessary) when a new kernel is installed.
Autoinstall script
If you're running CentOS, there is now an autoinstall script
which automates installation of asterisk-cnet and dahdi-cnet. This is for new installations only;
I recommend that it be used on a fresh install of CentOS (be sure to do an initial yum update first
to pull down the latest kernel!)
It will install the RPMForge repository for you, and download and
install my modified Asterisk and DAHDI packages. Do not use this to upgrade an existing installation.
It is preconfigured for use with CentOS 5 i386. You can edit it for CentOS 4 and/or x86_64 if
you need to do so. Just download it, read it over if you're paranoid, and invoke it as root with sh cnet-o-matic.sh
to run the install process.
1.4 and DAHDI Versions
Modified 1.4 sources and DAHDI drivers are now available!
Full Tarballs
As of July 25, 2007, full tarballs of the modified source are now
available, so you don't need to futz with patch files. If you WANT to
futz with patch files, they are available in the Downloads page.
asterisk-cnet tarball
Current 1.2 Version: 1.2.36-cnet
Current 1.4 Version: 1.4.29-cnet
NOTE: This version should be used with the zaptel-cnet
(1.4: dahdi-cnet) package below, due to the secondary dial tone
addition. If it is compiled against vanilla Zaptel or DAHDI, the extra
features will not be available.
Features:
- adds a
configurable option to make dial or DTMF pulsing audible to the caller;
it works in conjunction with the Zaptel patch below. This is directly
based on Max
Parke's Asterisk and Zaptel patches, but it is configurable per
channel, and it does not have his SF signalling additions.
- Provides a distinctive secondary dial tone if you use ignorepat in the extensions.conf file, and you're
using the us, xm, or xp tone
zones.
- 1.4 NOTE: If you want
standard US-style tones with a distinctive secondary dial tone in 1.4,
use the x1 tone zone (that's a
digit 1, not a lower case L).
Please read the READMEFIRST.cnet file
before installing.
Downloads:
asterisk-1.2.36-cnet.tar.gz
(use with zaptel-cnet 1.2)
asterisk-cnet-1.4.29.tar.gz
(use with dahdi-cnet or zaptel-cnet 1.4)
dahdi-cnet tarballs
This is for asterisk-cnet 1.4 only. Note that OSLEC support is built-in in my DAHDI release. This version of DAHDI should be
used with my modified Asterisk. Note that the drivers and the
tools are packaged separately, and you need both. The basic operation
is similar to Zaptel, but /etc/dahdi/system.conf
is the main configuration file. It features all of the enhancements
from zaptel-cnet.
Please read the READMEFIRST.cnet file
before installing.
Latest Tools: dahdi-cnet-tools-2.2.1.tar.gz
Latest Drivers: dahdi-cnet-linux-2.2.1.tar.gz
zaptel-cnet tarballs
NOTE:
I do not recommend 1.2.20 or 1.2.20.1 due to echo canceller problems.
They are available on the downloads page if you want them.
Also, 1.2.19 will work with the OSLEC echo
canceller, while 1.2.20 and 1.2.20.1 have caused kernel panics with
OSLEC on my system. To use OSLEC, follow the instructions on the OSLEC
site.
Latest Version: 1.2.27-cnet
(for 1.2), 1.4.12.1 (for 1.4)
Download: zaptel-1.2.27-cnet.tar.gz,
zaptel-cnet-1.4.12.1.tar.gz
This is a modified version of Digium's Zaptel device
drivers for
telephony interfaces; especially, the wctdm
driver for the TDM400P
analog telephone interface card. It provides the following features:
- the ability to force the TDM400P FXS ports to provide ring
current at a
specific frequency
- improved pulse dialing on TDM400P FXS ports
- two additional call progress tone sets, usable on any FXS port
- an ignoreflash keyword
that may be used in your /etc/zaptel.conf
file to cause FXO ports to ignore a remote hookflash
- dial pulse mappings for New Zealand (or Oslo, Norway), and
Sweden
- FXO pulse dial pause fix - "W" in dial strings will pause even
if the FXO is set for pulse dialing
- audible pulsing option; requires
the modified Asterisk in addition to the modified Zaptel
Quick Install:
Making use of the features:
- Ignore hookflash: If
your TDM400P has FXO ports on channels 1 and 2, and FXS ports on 3
and 4, you could tell the FXOs to ignore a remote hookflash as follows:
fxsks=1-2
ignoreflash=1-2
fxoks=3-4
# use my PBX tones instead of standard tones on the FXS ports
loadzone=xp
defaultzone=xp
- Dial pulse mapping: If
you
have rotary-dial phones with NZ/Oslo or Swedish dial arrangements,
you can set FXS channels like so:
pulse_nz_oslo=8
pulse_sweden=17-18
Note that dial pulse mapping
will work on T1/E1 channels as well as on TDM400P cards. The ignoreflash keyword will also
work.
UPDATE
2-27-07: Dial pulse mapping now
works for FXO ports as well as FXS. Use the same syntax above.
(3-31-07)
WARNING: Pulse dialing on T1
channel bank FXO ports may or may not work for you! I've noticed that
the pulses from an FXO on an Adtran 750 channel bank are rather
irregular-sounding, and also sound like they have an improper
break/make ratio. If you need to pulse dial into a step switch, I
suggest using either a TDM400P or X100P card!
- Pause fix for FXO pulse dialing:
Just use a "w" in the dial string, just like you would for DTMF.
- Audible pulsing: If you
want callers to hear your Asterisk box pulsing into your step switch,
you will need to apply the patch to Asterisk (chan_zap.c) as well as
the patch to Zaptel. You will then need to activate audible pulsing on
the channels where you want it in both /etc/zaptel.conf and /etc/asterisk/zapata.conf for this
to work.
/etc/zaptel.conf:
/etc/asterisk/zapata.conf:
; be sure to apply other settings to these channels
hearpulsing=yes
channel => 2
channel => 3
- FXS port ring frequency:
set when loading the wctdm
module. The command line
passed to modprobe would take
the form:
modprobe wctdm opermode=FCC30 fxshonormode=1 boostringer=1
Modes available are:
- FCC17 (16.67 Hz)
- FCC25 (25 Hz)
- FCC30 (30 Hz)
- FCC33 (33.33 Hz)
- FCC40 (40 Hz)
- FCC42 (42 Hz)
- FCC50 (50 Hz)
- FCC54 (54 Hz)
- FCC60 (60 Hz)
- FCC67 (66.66 Hz)
The standard FCC mode is 20 Hz.
NOTE: Changing the opermode parameter affects all FXS ports on
the card. This may change in a future release.
app_rpsim
This is a little application that may be installed into Asterisk to
provide simulated panel revertive pulsing sounds to a caller. It
expects a four-digit extension number.
- Download the
application sources.
- Untar the tarball and change to its directory.
-
make && make install
- Restart Asterisk.
In your extensions.conf file,
you could set up an sample extension as follows:
exten => 1234,1,RPSim(${EXTEN})
exten => 1234,n,Progress
exten => 1234,n,Ringing
exten => 1234,n,Wait(10)
exten => 1234,n,Answer
exten => 1234,n,Playback(tt-weasels)
exten => 1234,n,Hangup
Credit goes to Evan Doorbell's Panel
Pulsing Lover's Tape, available on the Phone Trips site, which
inspired this application and provided the pulse sounds.
pulsar AGI
The Pulsar AGI is an AGI version of the revertive pulsing simulator,
written in PHP. It can simulate panel, #1 Crossbar, and #5 Crossbar
pulsing.
- Download the package.
cd /var/lib/asterisk
tar xvfz pulsar-agi.tar.gz
In your extensions.conf file,
use it as follows:
exten =>
1234,1,AGI(pulsar.agi,${EXTEN},0,5xb)
exten => 1234,n,Progress
exten => 1234,n,Ringing
exten => 1234,n,Wait(10)
exten => 1234,n,Answer
exten => 1234,n,Playback(spam)
exten => 1234,n,Hangup
Notes:
- The third argument can be set to 1 to indicate a "B-side" that
adds 5 pulses to the second RP digit.
- The fourth argument should be one of:
panel
1xb
5xb