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.
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 :
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/zaptelNow compile and install Asterisk :
wget http://www.lusyn.com/asterisk/zaptel_usehist_141.diff
patch <zaptel_usehist_141.diff
make
make install
make config
cd ../asterisk
wget http://www.lusyn.com/asterisk/asterisk_usehist_142.diff
patch -p0 <asterisk_usehist_142.diff
./configure
make install
Edit /etc/asterisk/zapata.conf and use the following three lines for CallerID :
usecallerid=yes
cidsignalling=v23
cidstart=usehist