Zaptel for PRI


Q1, You can not compile zaptel and asterisk

please make sure that:
1) You have installed all necessary packages and kernel source.
2) Make sure the version of kernel source is exactly same with the version of the kernel.
please check the few links:
http://wiki.openvox.cn/index.php/D110P
http://wiki.openvox.cn/index.php/D210P
http://wiki.openvox.cn/index.php/D410P
http://www.asteriskguru.com/tutorials/
3) make sure that you do not miss any packages or files in asterisk or zaptel.
4) make sure your system can access www.asterisk.org.

Q2, ZT_SPANCONFIG failed on span 1: Invalid argument (22)

please check:
1) run lspci -vvvvv, make sure the system can detect the card. Tiger jet chip will be found. If there is no such Tiger jet chip, please clean the PCI slot and try again.
2) if lspc can find the card, make sure the pci id is included in the PCI table in our driver. how to patch the picid, please refer this link:
http://www.openvox.cn/kb/entry/2/
3) if step 1 and step 2 are ok, please check the zaptel.conf or system.conf to make sure that the setting is correct.
4) if step 3 is correct, please make sure that there is no mISDN tiger jet module in the system, if it is there, please remove that or add to blacklist.
5) if you still can not boot it up, you have to recompile zaptel or dahdi again.

Q3, when compiling zaptel, error: You do not appear to have the sources for...

please refer this:
http://forums.digium.com/viewtopic.php?t=7061
http://lists.digium.com/pipermail/asterisk-users/2007-June/189259.html

Q4, Bug#439814: zaptel-source: oslec_echo_can_identify undefined symbol

please refer this:
http://lists.alioth.debian.org/pipermail/pkg-voip-maintainers/2007-August/009225.html

Q5, Bug in Zaptel 1.2.20.1 and 1.4.5.1 - Only MG2

please refer this:
http://trixbox.org/node/21080 http://www.rowetel.com/ucasterisk/oslec.html

Q6, chan_zap.c:7874 pri_dchannel: PRI got event: HDLC Abort (6) on Primary D-channel of span 1

If you see the error Jul 14 13:55:21 NOTICE[19519]:
chan_zap.c:7874 pri_dchannel: PRI got event: HDLC Abort (6) on Primary D-channel of span 1
only occasionally, then you might have some devices in your pc (ide cards?) taking to long when taking an intterupt.
You might want to try to put the te411p card on a different cpu, or if its probably an ide card doing it, try playing with 
hdparm (make your drivers slower) or disable that card, and take a new one.

Q7, chan_zap.c:7874 pri_dchannel: PRI got event: HDLC Abort (6) on Primary D-channel of span 1

If you are being flooded (several times a second, non stop and the pri never worked) by lines as:
Jul 14 13:55:21 NOTICE[19519]: chan_zap.c:7874 pri_dchannel: PRI got event: HDLC Abort (6) on Primary D-channel of span 1
Then probably the PRI you are using is not using PRI signalling but maybe some other type of signalling like E&M.

Q8, chan_zap.c:7874 pri_dchannel: PRI got event: HDLC Abort (6) on Primary D-channel of span 1

If you see the error Jul 14 13:55:21 NOTICE[19519]:
chan_zap.c:7874 pri_dchannel: PRI got event: HDLC Abort (6) on Primary D-channel of span 1

1) only occasionally, then you might have some devices in your pc (ide cards?) taking to long when taking an intterupt.
You might want to try to put the te411p card on a different cpu, or if its probably an ide card doing it, try playing with 
2) check with hdparm (make your drivers slower), make sure speed of hard disk is normal.
3) try dchan => 16 change to hardhdlc => 16 in system.conf file.
4) try LBO with other values.
5) set resetinterval = never in chan_dahdi.conf
6) make sure the ports running with same providers.
7) try replacing with a new card.

Q9, Tonezones for zaptel.conf

The file zonedata.c contains the information about the tone zones used in libtonezone (and hence also in ztcfg). Here is a list of those zones:

us United States / North America

au Australia

fr France

nl Netherlands

uk United Kingdom

fi Finland

es Spain

jp Japan

no Norway

at Austria

nz New Zealand

it Italy

us-old United States Circa 1950 / North America

gr Greece

tw Taiwan

cl Chile

se Sweden

be Belgium

sg Singapore

il Israel

br Brazil

hu Hungary

lt Lithuania

pl Poland

za South Africa

pt Portugal

ee Estonia

mx Mexico

in India

de Germany

ch Switzerland

dk Denmark

cz Czech Republic

cn China

ar Argentina

my Malaysia

th Thailand

bg Bulgaria

ve Venezuela

ph Philippines

ru Russian Federation

tr Turkey


Q10, How to install asterisk, zaptel and chan_ss7

if you want to install asterisk, chan_ss7 and zaptel, please follow these steps:
1) download asterisk-1.4.20, zaptel-1.4.10 and chan_ss7_1.1
2) unzip asterisk-1.4.20.tar.gz to /usr/src, under asterisk dir,

  please run: ./configure, make , make install, make samples.

3) unzip zaptel-1.4.10.tar.gz to /usr/src/, under zaptel dir, please run:

  ./confiugre, make , make install

4) unzip the chan_ss7_1.1.tar.gz to /usr/src, under chan_ss7_1.1, please do this:
4.1) modify the Makefile, do like this:

# non-standard places.
INCLUDE+=-I /usr/src/zaptel-1.4.10/kernel  ; point to the zaptel source
#INCLUDE+=-I../source/telephony/dahdi/include
INCLUDE+=-I /usr/src/asterisk-1.4.20  ; point to asterisk source

4.2) save and quit
4.3) run: make , make install ; 安装,编译 chan_ss7
4.4) copy ss7.conf file to /etc/asterisk/
4.5) copy chan_ss7.so to /usr/lib/asterisk/modules/
5) edit the zaptel.conf like this:

# Autogenerated by ./genzaptelconf -- do not hand edit
# Zaptel Configuration File
#
# This file is parsed by the Zaptel Configurator, ztcfg
#

# It must be in the module loading order


# Span 1: TE4/0/1 "T4XXP (PCI) Card 0 Span 1" (MASTER)
span=1,1,0,ccs,hdb3,crc4
# termtype: te
bchan=1-31
# dchan=16

# Span 2: TE4/0/2 "T4XXP (PCI) Card 0 Span 2"
span=2,2,0,ccs,hdb3,crc4
# termtype: te
bchan=32-62
# dchan=47

# Span 3: TE4/0/3 "T4XXP (PCI) Card 0 Span 3"
span=3,3,0,ccs,hdb3,crc4
# termtype: te
bchan=63-93
# dchan=78

# Span 4: TE4/0/4 "T4XXP (PCI) Card 0 Span 4"
span=4,4,0,ccs,hdb3,crc4
# termtype: te
bchan=94-124
#dchan=109

# Global data

loadzone        = us
defaultzone     = us

6) edit ss7.conf like this:

[linkset-ls1]
enabled => yes
enable_st => yes
use_connect => no
hunting_policy => even_mru
context => ss7_call
language => en
subservice => auto
variant => CHINA ; 支持中国ss7 号信令
[link-l1]
linkset => ls1
channels => 1-15,17-31
schannel => 16
firstcic => 1
enabled => yes

echocancel => no
echocan_train => 350
echocan_taps => 128

[link-l2]
linkset => ls1
channels => 1-31
schannel =>
firstcic => 33
enabled => yes

[link-l3]
linkset => ls1
channels => 1-31
schannel =>
firstcic => 65
enabled => yes

[link-l4]
linkset => ls1
channels => 1-31
schannel =>
firstcic => 97
enabled => yes

[host-openvox]; host IP
enabled => yes
opc => 0x222222 ; 点码
dpc => ls1:0x298922 ; 点码
links => l1:1
links => l1:1,l2:2,l3:3,l4:4

7) edit extensions.conf:

extensions.conf
[ss7_call]
exten => 100,1,Dial(ss7/outgoing number)
exten => 100,2,Hangup

8) Load zaptel, wct4xxp and start asterisk

modprobe zaptel ; load zaptel
modprobe wct4xxp ; load the wct4xxp 
ztcfg -vvvvvvv ; load the channels
asterisk -vvvvvvvgc ; start asterisk

Under asterisk console

CLI> ss7 link status   ;Check the status, make sure there is no error.
                       ; 检查 ss7 的状态, 确保没有异常。
linkset ls1, link l1, schannel 16, sls 0, INSERVICE, rx: 5, tx: 1/3, sentseq/lastack: 4/4, total    199328,    199424
CLI> ss7 status
linkset        idle busy initiating resetting total incoming total outgoing
ls1              30    0          0         0              0              0
gw1*CLI> ss7 linestat
Linkset: ls1
CIC   1 Idle
CIC   2 Idle
CIC   3 Idle
CIC   4 Idle
CIC   5 Idle
CIC   6 Idle
CIC   7 Idle
CIC   8 Idle
CIC   9 Idle
CIC  10 Idle
CIC  11 Idle
CIC  12 Idle
CIC  13 Idle
CIC  14 Idle
CIC  15 Idle
CIC  17 Idle
CIC  18 Idle
CIC  19 Idle
CIC  20 Idle
CIC  21 Idle

9) Use an extension dial 100 to make a call to ss7

Test tools

asterisk-1.4.20
zaptel-1.4.10
chan_ss7-1.1(1.1 以上版本已经支持中国ss7 号信令), 1.1 以前的版本请到openvox.cn 下载。
Openvox D410P

References

http://www.dicea.dk/company/chan_ss7
voip-info.org
www.openvox.cn