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:
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:

Quick Install:

Making use of the features:

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
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!
/etc/zaptel.conf:
hearpulsing=2-3
/etc/asterisk/zapata.conf:
; be sure to apply other settings to these channels
hearpulsing=yes
channel => 2
channel => 3
modprobe wctdm opermode=FCC30 fxshonormode=1 boostringer=1
Modes available are:
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.
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.
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:
panel
1xb
5xb