LUSYN

Asterisk history buffer patches (1.2)

Overview

On BT lines in the UK, caller ID information is sent before the first ring.  The start of the Caller ID feed is signalled by a polarity reversal. The X100P card does not support detection of polarity reversals, so Tony Hoyle devised a method of using a buffer to store data as it is received. Once the first ring arrives, the buffer has a history of what was received immediately before so the caller ID information can be extracted.

Although originally written for the UK, this patch has been known to work in other countries.

Disclaimer

These patches are provided under the GNU General Public License (GPL) as is and with no warranty.

Bug report

http://bugs.digium.com/view.php?id=1719

Obtaining the patches

The easiest way is to use wget when appyling the patches, as illustrated below. Download links are :

Prerequisites

If you are using a production version of v1.2.x, you may be affected by a bug in ring handling. You will also need to apply asterisk_ringbegin.diff.

Applying the patches

First of all you need to obtain the source code. You can follow the instructions here.  Then, as root, do the following :

cd /usr/src/zaptel
wget http://www.lusyn.com/asterisk/zaptel_usehist.diff
patch <zaptel_usehist.diff
make clean
make install
make config

cd ../asterisk
wget http://www.lusyn.com/asterisk/asterisk_usehist.diff
patch -p0 <asterisk_usehist.diff

You may require this patch for v1.2+ if caller ID and distinctive ring are not working :

wget http://www.lusyn.com/asterisk/asterisk_ringbegin.diff
patch -p0 <asterisk_ringbegin.diff

Now compile and install Asterisk :

make clean
make install

Edit /etc/asterisk/zapata.conf and use the following three lines for CallerID :

usecallerid=yes
cidsignalling=v23
cidstart=usehist