Zaptel For Analog

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:
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 lspci can find the card, make sure the pci id is included in the PCI table in our driver. 
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, Where get i get zaptel?

Now you can get two versions about zaptel from our website:
http://www.openvox.cn/pub/drivers/zaptel/release/openvox_zaptel-1.2.27.tar.gz

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

Q4, How can you compile asterisk with zaptel

1) Download the zaptel driver from our website
2) Unpack the driver and go into the file to run make &&make install

Q5, FATAL: Module wctdm/opvxa1200/opvxa24xx not found

if this problem occurred, please make sure:
1) the module is compiled and installed properly
2) you entered a right kernel, which you used to compile the zaptel
3) make sure you have a access permission to load the module.
4) make sure the wctdm.ko/opvxa1200.ko/opvxa24xx.ko is under /lib/modules/2.6.XX/extra


Q6, check information of wctdm.ko/opvxa1200.ko/opvxa24xx.ko

Under /lib/modules/2.6.18-128.el5/misc
run command: modinfo wctdm.ko, run modinfo opvxa1200 if checking opvxa1200
[root@bogon misc]# modinfo wctdm.ko
filename: wctdm.ko
license: GPL
alias: wcfxs
author: Mark Spencer <markster@digium.com>
description: Wildcard TDM400P Zaptel Driver
srcversion: 5E22C66ED4D5B1ADE573C83
alias: pci:v0000E159d00000001sv0000A901sd*bc*sc*i* alias: pci:v0000E159d00000001sv0000A908sd*bc*sc*i* alias: pci:v0000E159d00000001sv0000A801sd*bc*sc*i* alias: pci:v0000E159d00000001sv0000A800sd*bc*sc*i* alias: pci:v0000E159d00000001sv0000A8FDsd*bc*sc*i* alias: pci:v0000E159d00000001sv0000A9FDsd*bc*sc*i* alias: pci:v0000E159d00000001sv0000B119sd*bc*sc*i* alias: pci:v0000E159d00000001sv0000B118sd*bc*sc*i* alias: pci:v0000E159d00000001sv0000B1D9sd*bc*sc*i* alias: pci:v0000E159d00000001sv0000B100sd*bc*sc*i* alias: pci:v0000E159d00000001sv0000E159sd*bc*sc*i* alias: pci:v0000E159d00000001sv0000A159sd*bc*sc*i* depends: zaptel
vermagic: 2.6.18-128.el5 SMP mod_unload 686 REGPARM 4KSTACKS gcc-4.1
parm: debug:int
parm: loopcurrent:int
parm: reversepolarity:int
parm: robust:int
parm: opermode:charp
parm: timingonly:int
parm: lowpower:int
parm: boostringer:int
parm: fastringer:int
parm: fxshonormode:int
parm: battdebounce:uint
parm: battalarm:uint
parm: battthresh:uint
parm: ringdebounce:int
parm: fwringdetect:int
parm: alawoverride:int
parm: fastpickup:int
parm: fxotxgain:int
parm: fxorxgain:int
parm: fxstxgain:int
parm: fxsrxgain:int
[root@bogon misc]# pwd
/lib/modules/2.6.18-128.el5/misc


Q7, RHEL/Centos 5.2: xpp/xdefs.h:117: error: conflicting types for ‘bool’

please refer this:
https://issues.asterisk.org/view.php?id=12889

Q8, xpp modules do not compile with kernel 2.6.19-1.2919.fc7

please refer this:
https://issues.asterisk.org/view.php?id=9006

Q9, spinlock.h error with RHEL 4

please refer this link:
http://forums.digium.com/viewtopic.php?p=17034&sid=c914a0a979f8437576c7aa92518fe48b

Q10, Compile error on CentOS-4.6 with Kernel-2.6.9-67.0.15.ELsmp and CONFIG_DAHDI_NET

please refer this link:
https://issues.asterisk.org/view.php?id=13427

Q11, dahdi_compat.h:31:27: error: zaptel/zaptel.h: No such file

please read this:
https://issues.asterisk.org/view.php?id=14121

Q12, 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

Q13, 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

Q14, 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

Q15, Tonezones for wctdm/opvxa1200/opvxa24xx

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

Q16, Tools from zaptel to dahdi

ztcfg -> dahdi_cfg
ztmonitor -> dahdi_monitor
ztscan -> dahdi_scan
ztspeed -> dahdi_speed
zttest -> dahdi_test
zttool -> dahdi_tool
zapconf -> dahdi_genconf (deprecates genzaptelconf)

Q17, the list of opermode

when loading the driver wctdm/opvxa1200/opvxa24xx,
modprobe wctdm opermode=YOUR COUNTRY
please check from the list: fxo_mudules.h

{	 US, Canada 


{ .name = "FCC",
.rt = 1,
.dcv = 0x3,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
},
/* Austria, Belgium, Denmark, Finland, France, Germany,
Greece, Iceland, Ireland, Italy, Luxembourg, Netherlands,
Norway, Portugal, Spain, Sweden, Switzerland, and UK */
{ .name = "TBR21",
.ilim = 1,
.dcv = 0x3,
.acim = 0x2,
.ring_osc = 0x7e6c,
.ring_x = 0x023a,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
},
{ .name = "ARGENTINA",
.dcv = 0x3,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
},
{ .name = "AUSTRALIA",
.ohs = 1,
.mini = 0x3,
.acim = 0x3,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
},
{ .name = "AUSTRIA",
.ohs2 = 1,
.ilim = 1,
.dcv = 0x3,
.acim = 0x3,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
},
{ .name = "BAHRAIN",
.ilim = 1,
.dcv = 0x3,
.acim = 0x2,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
},{ .name = "BELGIUM",
.ohs2 = 1,
.ilim = 1,
.dcv = 0x3,
.acim = 0x2,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
}, { .name = "BRAZIL",
.mini = 0x3,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
}, { .name = "BULGARIA",
.ilim = 1,
.dcv = 0x3,
.mini = 0x0,
.acim = 0x3,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
}, { .name = "CANADA",
.dcv = 0x3, .battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
}, { .name = "CHILE",
.dcv = 0x3,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
}, { .name = "CHINA",
.mini = 0x3,
.acim = 0xf,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
}, { .name = "COLOMBIA",
.dcv = 0x3, .battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
},
{ .name = "CROATIA",
.ilim = 1,
.dcv = 0x3,
.mini = 0,
.acim = 0x2,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
},
{ .name = "CYPRUS",
.ilim = 1,
.dcv = 0x3,
.acim = 0x2,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
}, { .name = "CZECH",
.ilim = 1,
.dcv = 0x3,
.mini = 0,
.acim = 0x2,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
},
{ .name = "DENMARK",
.ohs2 = 1,
.ilim = 1,
.dcv = 0x3,
.acim = 0x2,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
}, { .name = "ECUADOR",
.dcv = 0x3,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
}, { .name = "EGYPT",
.mini = 0x3,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
}, { .name = "ELSALVADOR",
.dcv = 0x3,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
}, { .name = "FINLAND",
.ohs2 = 1,
.ilim = 1,
.dcv = 0x3,
.acim = 0x2,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
},
{ .name = "FRANCE",
.ohs2 = 1,
.ilim = 1,
.dcv = 0x3,
.mini = 0,
.acim = 0x2,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
}, { .name = "GERMANY",
.ohs2 = 1,
.ilim = 1,
.dcv = 0x3,
.acim = 0x3,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
}, { .name = "GREECE",
.ohs2 = 1,
.ilim = 1,
.dcv = 0x3,
.acim = 0x2,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
}, { .name = "GUAM",
.dcv = 0x3,
.battdebounce = 64,
.battalarm = 1000, .battthresh = 3,
}, { .name = "HONGKONG",
.dcv = 0x3, .battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
}, { .name = "HUNGARY",
.dcv = 0x3,
.battdebounce = 64,
.battalarm = 1000,
.battthresh = 3,
}, { .name = "ICELAND",
.ohs2 = 1, .ilim = 1, .dcv = 0x3, .acim = 0x2, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "INDIA",
.dcv = 0x3, .acim = 0x4, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "INDONESIA",
.dcv = 0x3, .battdebounce = 64, .battalarm = 1000,
.battthresh = 3,
}, { .name = "IRELAND",
.ohs2 = 1, .ilim = 1, .dcv = 0x3, .acim = 0x2, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "ISRAEL",
.ilim = 1, .dcv = 0x3, .acim = 0x2, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "ITALY",
.ohs2 = 1, .ilim = 1, .dcv = 0x3, .acim = 0x2, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "JAPAN",
.mini = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "JORDAN",
.mini = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "KAZAKHSTAN",
.dcv = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "KUWAIT",
.dcv = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "LATVIA",
.ilim = 1, .dcv = 0x3, .acim = 0x2, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "LEBANON",
.ilim = 1, .dcv = 0x3, .acim = 0x2, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "LUXEMBOURG",
.ohs2 = 1, .ilim = 1, .dcv = 0x3, .acim = 0x2, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "MACAO",
.dcv = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, /* Current loop >= 20ma */
{ .name = "MALAYSIA",
.mini = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "MALTA",
.ilim = 1, .dcv = 0x3, .acim = 0x2, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "MEXICO",
.dcv = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "MOROCCO",
.ilim = 1, .dcv = 0x3, .acim = 0x2, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "NETHERLANDS",
.ohs2 = 1, .ilim = 1, .dcv = 0x3, .acim = 0x2, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
},

{ .name = "NEWZEALAND",
.dcv = 0x3, .acim = 0x4, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "NIGERIA",
.ilim = 0x1, .dcv = 0x3, .acim = 0x2, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "NORWAY",
.ohs2 = 1, .ilim = 1, .dcv = 0x3, .acim = 0x2, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "OMAN",
.mini = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "PAKISTAN",
.mini = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "PERU",
.dcv = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "PHILIPPINES",
.mini = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "POLAND",
.rz = 1, .rt = 1, .dcv = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "PORTUGAL",
.ohs2 = 1, .ilim = 1, .dcv = 0x3, .acim = 0x2, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "ROMANIA",
.dcv = 3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "RUSSIA",
.mini = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "SAUDIARABIA",
.dcv = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "SINGAPORE",
.dcv = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "SLOVAKIA",
.dcv = 0x3, .acim = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "SLOVENIA",
.dcv = 0x3, .acim = 0x2, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "SOUTHAFRICA",
.ohs = 1, .rz = 1, .dcv = 0x3, .acim = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "SOUTHKOREA",
.dcv = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "SPAIN",
.ohs2 = 1, .ilim = 1, .dcv = 0x3, .acim = 0x2, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "SWEDEN",
.ohs2 = 1, .ilim = 1, .dcv = 0x3, .acim = 0x2, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "SWITZERLAND",
.ohs2 = 1, .ilim = 1, .dcv = 0x3, .acim = 0x2, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "SYRIA",
.mini = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "TAIWAN",
.mini = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "THAILAND",
.mini = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "UAE",
.dcv = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "UK",
.ohs2 = 1, .ilim = 1, .dcv = 0x3, .acim = 0x5, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "USA",
.dcv = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
}, { .name = "YEMEN",
.dcv = 0x3, .battdebounce = 64, .battalarm = 1000, .battthresh = 3,
},
};



Q18, Sound quality issue with wctdm/opvxa1200/opvxa24xx

you can try these possible solutions:
1) Check the IRQ, make sure system handle IRQ properly
2) Use zttest to check the result
3) Disable the X window and framebuffer(set vga=normal from grub)
4) When using IDE driver, please open the DMA control
5) Bind the card IRQ to particular CPU, for example:
echo 1 > /proc/irq/217/smp_affinity #wcfxo
6) Set the latency timer: setpci -v -s 04:06.0 LATENCY_TIMER=f8 #wcfxo