Enhanced CID Detection Feature in A810/1610/2410


Contents

Chapter 1 Overview

Commonly seen in analog calls, electronic telephone systems and VoIP applications, Caller ID (caller identification,CID) is a type of telephone service, sends information such as caller’s number and name before callee’s hooking off.
There are different CID signal standards all around the world, while common and famous ones are Bellcore FSK、ETSI FSK V23、Japan V23 FSK、DTMF. Asterisk supports these four types CID, detects them accurately on the premise of knowing and setting CID signaling which PSTN uses in advance.However, different country and zone uses different CID signaling, if use different CID or cannot foreknowledge PSTN line uses which standard, is a big problem to detect CID.
To save costs and improve work efficiency, OpenVox has researched and developed CID automatical identification. This function solves problem of simultaneously using different PSTN lines caused , elimilates troublesome of knowing PSTN line‘s CID standard.

1.1 System structure and application

OpenVox enhanced CID detection runs on Linux kernel and load together with our cards’ driver program. After loading DSP library, it will generate a tree-type directory in /proc, which includes information such as every channel’s number and CID parameters. It is able to read and modify CID parameters by reading and writing every /proc file system. Meanwhile, the function takes advantage of Asterisk resource module to automatically load and configurate channels.

Operation procedures:
1. Install DAHDI; 
2. Install Asterisk patches; 
3. Configurate file opvxdsp.conf to load preset parameters; 
4. Set CID parameters of chan_dahdi.conf: usecallerid,cidsignalling,cidstart

1.2 Total path: /proc/opvxdsp/FXO channel number /opencid/parameter

Parameters:

|____cidstart
|____detect_signal
|____last_signal
|____disable

cidstart --- Default value: unknown, Read-only, signals start of caller ID, includes “unknown”,“ring”,“polarity”,“polarity_in”,“dtmf”;
detect_signal --- Default value: unknown, Read-only, signals current of caller ID, includes “unknown”,“bell”,“v23”,“v23_jp”,“dtmf”;
last_signal --- Default value: unknown, Read-only, signals last time detected of caller ID;
disable --- Default value:0, current channel caller ID analysis switch, 1 means off,0 means on;

chapter 2 Installation

Choose and download a driver package from OpenVox official website:
http://downloads.openvox.cn/pub/drivers/dahdi-linux-complete/releases/1.3.5/ 

http://downloads.openvox.cn/pub/drivers/zaptel/openvox_zaptel-1.4.12.1.tar.gz

Chapter 3 Install Asterisk Patch

3.1 Install

Download the Asterisk patch from URL:
http://downloads.openvox.cn/pub/drivers/asterisk-patches/enhance.tar.gz 

3.2 Install the patch on Asterisk 1.2.x

1.Unzip

# tar –xzvf enhance.tar.gz

2.Copy res_enhance.c to $astersksource/res 

# cp res_enhance.c $asterisksource/res/

3.Copy opvxdsp.conf to /etc/asterisk 

# cp opvxdsp.conf $asterisksource/res/

4.Edit $astersksource/res/Makefile

# vi /usr/src/asterisk/res/Makefile

5.Edit the line:

MODS=res_indications.so res_monitor.so res_adsi.so res_agi.so res_features.so

To:

MODS=res_indications.so res_monitor.so res_adsi.so res_agi.so res_features.so res_ enhance.so

6.Recompile Asterisk 

# cd $asterisksource
# make
# make install

7.Configure /etc/asterisk/opvxdsp.conf
Please refer to Chapter 4.

8.Restart Asterisk

3.3 Install the patch on Asterisk

It supports Asterisk 1.4 and higher verison.
1.Unzip

# tar –xzvf enhance.tar.gz

2.Copy res_enhance.c to $astersksource/res

# cp res_ enhance.c $asterisksource/res/

3.Copy opvxdsp.conf to /etc/asterisk

# cp opvxdsp.conf /etc/asterisk

4.Recompile Asterisk

# cd $asterisksource
# make
# make install

5.Configure /etc/asterisk/opvxdsp.conf

Please refer to Chaper 4.

6.Restart Asterisk

3.4 Asterisk CLI

1. Check channel information

*CLI> callerid show	        #show all FXO channel numbers
*CLI> callerid show 1	        #show all parameters of channel 1

2. Set channel parameters,the current channel depends on “callerid show channel”

*CLI> callerid set disable 1   # close the current channel caller ID analysis
*CLI> callerid set disable 0   # open the current caller ID analysis

Chapter 4 Configuration files

Asterisk will load configuration file opvxdsp.conf automatically everytime when your server is start once finish installing the patch as the chapter 3 introduces. Configuring the opvxdsp.conf file is to realize acquiescently load preset parameters and setting chan_dahdi.conf to support CID detection. 

4.1 Configurate file opvxdsp.conf

1.Set segment name:Effective value is [opencid],repeatable
2. Set segment parameters: 
1)channel=preset FXO channel number(must be set);
2)disable=0 or 1

Question 1:Close CID analysis on channel 11,12,13,17 
To solve:
Add the following lines in opvxdsp.conf:

[opencid]
channel=11-13,17
disable=1

4.2 Set chan_dahdi.conf

Set the following parameters:

usecallerid=yes          ;Able CID detection
cidsignalling=bell       ;CID type is BELL202
cidstart=ring            ;CID detection starts once rings