Troubleshooting of Analog cards

From Wiki
Jump to: navigation, search

This troubleshooting is conducted to give users a guideline to fix problems. here, most of problems are list out, if user follows that exactly, most of the problems should be solved. (***keep updating***)

Contents

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/A1200P
http://wiki.openvox.cn/index.php/A400P
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, You can not make calls from asterisk

there are few reasons why you can not make calls:
1) check your extensions from your asterisk side, make sure your sip is ready to make calls, and SIP is with a right context what you put in extensions.conf
2) your wctdm or opvxa1200 does not boot up(leds are off).
3) leds are up and card driver has boot up properly, but the zapata.conf is
, so asterisk does not boot up properly,
please check by run: zap show channels
if is empty or no such command, you should check your zapata.conf
4) You maybe recompile your zaptel and asterisk again.

Q4, How do you adjust the volume of voice for analog cards?

You can edit the zapata.conf and change rxgain=5 and txgain=6 or other values. you can use ztmonitor to test that.check from here:
http://linux.die.net/man/8/ztmonitor

Q5, You can not hangup calls

To resolve the problem, please check:
1) set timezone and defaulzone to your country, set country=your country in indication.conf and run: modprobe wctdm/opvxa1200 opermode=YOUR country
2) open busydetect=yes and busycount=4
3) ask your provider to open the "disconnect supervision" service check for more details,
please go here:
http://www.asteriskguru.com/tutorials/resolving_hangup_detection_problems_fxo_tdm_voicemail.html

Q6, You can not get the callerid

If you have a problem with callerid, please check with this link:
http://bbs.openvox.cn/viewthread.php?tid=831&extra=page%3D1
or edit the line:
in asterisk/main/dsp.c,
========================

  1. define DTMF_THRESHOLD 8.0e7
  2. define FAX_THRESHOLD 8.0e7
  3. define FAX_2ND_HARMONIC 2.0 /* 4dB */
  4. define RADIO_RELAX // add this line
  5. ifdef RADIO_RELAX
  6. define DTMF_NORMAL_TWIST

=========================
after editing, recompiling asterisk.

Q7, Call conversation suddenly dropped

please refer this reference from digium:
Dropped Calls on TDM
If you are having dropped calls on a TDM400P card or an X100P card there are several things that might cause this.
1)BusyDetect
2)CallProgress
BusyDetect and CallProgress may cause Asterisk to detect false hangups. Setting BusyCount to a higher value or turning off CallProgress may fix the problem. An excessive number of IRQMisses may also cause these problems.
link:http://kb.digium.com/entry/71/
3) try to set
/etc/modprobe.conf,install wctdm to:
install wctdm /sbin/modprobe --ignore-install wctdm battdebounce=128 && /sbin/ztcfg

Q8, How can you set the analog card for your country?

To set asterisk pbx with your country support, you must:
1) set timezone and defaultzone to your country in zaptel.conf or system.conf of dahdi
2) set the country=your country in indication.conf
3) modprobe wctdm or opvxa1200 opermode=YOUR country with capital letter.
4) cat the opermode to confirm the parameter has been loaded
[root@bogon misc]# cat /sys/module/wctdm/parameters/opermode
CHINA
[root@bogon misc]#
if using opvxa1200, please run in this way:
cat /sys/module/opvxa1200/parameters/opermode
5) after load the drivers, run dmesg command to check the mode.

Q9, How can you open the debug for asterisk?

1) You can edit the file logger.conf under /etc/asterisk,
enable the debug or error, those message will be stored under
/var/log/asterisk
2) you also can start your asterisk in this way:
asterisk -vvvvvvvvgc -d

Q10, How can i check the IRQ of analog cards?

please run the command:
cat /proc/interrupts
you should see the IRQs, Make sure the card has OWN IRQ, Do NOT share with other devices.
more details, please check from here:
http://www.voip-info.org/wiki/view/Asterisk+PCI+bus+Troubleshooting

Q11, Where are the opvxa1200 drivers/user manuals for dahdi and zaptel?

Under the download, you can see that there are three subdirectories:
First one is driver, you can get the individual opvxa1200 driver.
Second is a zaptel with opvxa1200, you can choose a proper version for you.
Third one is for dahdi, if you want to try dahdi, you can download whole packages.
link: http://www.openvox.cn/download/

Q12, Sound Quality Problems with Analog cards

please refer this link:
http://www.asteriskguru.com/tutorials/pci_irq_apic_tdm_ticks_te410p_te405p_noise.html

Q13, How can you compile asterisk with dahdi for wctdm and opvxa1200

please refer these links:
http://bbs.openvox.cn/viewthread.php?tid=574&extra=page%3D3
http://bbs.openvox.cn/viewthread.php?tid=587&extra=page%3D1
http://www.openvox.cn/download/
http://www.voip-info.org/wiki/view/DAHDI
http://www.russellbryant.net/blog/category/dahdi/
http://blog.paulsnet.org/?p=44
http://docs.tzafrir.org.il/dahdi-tools/?C=S%3BO=A

Q14, I am hearing an echo. What can I do to fix this?

please refer these links:
http://kb.digium.com/entry/1/
http://www.voip-info.org/wiki/view/Asterisk+echo+cancellation

Q15, Asterisk does not properly detect when a caller hangs up the phone. How do I fix this?

please refer this link:
http://kb.digium.com/entry/6/

Q16, When will the LED's light up on my TDM400P/TE110P/TE2XXP/TE4XXP?

For the TDM400P and TE110P cards, the LED's will not be lit up until the kernel module is loaded. The TDM400P LED's will light up when the ports are configured and the kernel module is loaded. They do not change if a phone or trunk is plugged in or not. The TE110P LED's will light up RED when the span is configured and kernel module is loaded. If configured correctly and a circuit or channel bank is connected the LED should turn GREEN.

For the TE2XXP/TE4XXP the LED's should scroll(knightrider) RED even without the kernel module being loaded or anything plugged in. When you have the spans properly configured and kernel module loaded without a circuit or channel bank the LED's should pulse RED. With the module loaded and a circuit/channel bank connected they should be solid GREEN. link from here:
http://kb.digium.com/entry/13/

Q17, What are the differences between FXS and FXO interfaces?

FXS (Foreign eXchange Station) is an interface which drives a telephone. FXS interfaces get phones plugged into them, delivery battery, and provide ringing. FXS interfaces are signalled with FXO signalling.

FXO (Foreign eXchange Office) is an interface that connect to a phone line. They supply your PBX with access to the public telephone network. FXO interfaces use FXS signalling. FXS interfaces are what allow you to hook telephones to your PBX, and FXO interfaces allow you to connect your PBX to real analog phone lines.

Q18, What is the difference between loopstart, groundstart, and kewlstart signalling?

Loopstart signalling is used by virtually all analog phone lines. It allows a phone to indicate on hook/offhook, and the switch to indicate ring/no ring.

Kewlstart is based on loopstart, but extends the protocol by allowing the switch to drop battery on the phone line to indicate to the phone that the other end of the party has disconnected the call. Most real phone switches, and almost no PBX's (except Asterisk, of course) support this feature. It is generally required for getting hangup notification.

Groundstart signalling is sometimes used by PBX's. If you don't know what it is, don't worry, you won't need it.

Q19, Why is my card getting an IRQ miss?

Each peice of hardware takes 1,000 interrupts per second. When, for some reason the cards get less than this, an IRQ miss occurs. You can see if the card is missing interrupts using 'zttool.'

IRQ misses can cause different problems with Asterisk. Symptoms of IRQ misses are bad audio quality or perhaps PRI errors, although IRQ misses will not cause alarms. Also DTMF detection not working is something that can be caused by IRQ misses as well.

Several common things that contribute to IRQ misses are: -Running the X window system -Shared IRQs -No hard drive DMA -Hard drive DMA too high (shoot for udma3) -Running serial terminals or frame buffers

To check for shared IRQs you can run:

  1. cat /proc/interrupts
 	CPU0 	 

0 10756672 XT-PIC timer 2 0 XT-PIC cascade 5 10812879 XT-PIC uhci_hcd, uhci_hcd, wctdm 10 226219 XT-PIC t1xxp, CS46XX 11 1550046 XT-PIC eth0, nvidia 12 387234 XT-PIC i8042 14 32641 XT-PIC ide0 15 18 XT-PIC ide1 NMI 0 LOC 10757616 ERR 40481 MIS 0


Notice the T100P card sharing with the sound card, and the TDM400P card is sharing with the USB controller. This will most likely cause problems. If you are not using any USB devices that would probably be ok, but it would be best to disable USB or get the card on it's own IRQ.

There are several ways to move cards to their own IRQ.

   -Turn on APIC
   -Tweak BIOS settings
   -Try a different PCI slot
   -Use setpci

refer this link from digium: http://kb.digium.com/entry/63/

Q20, What should I do if my FXS fails calibration?

Try compiling the kernel without frame buffer support.
link:http://kb.digium.com/entry/61/

Q21, Why am I having DTMF detection problems?

Zaptel DTMF Detection Problems
DTMF detection problems can be caused by a number of different factors. The most common is running the X Windows System. Another cause of DTMF detection problems is the relaxdtmf option in Zapata.conf. It may need to be turned on or off. If you need to force all DTMF detection to be done in software, you can set vpmdtmfsupport to 0 in wctdm24xxp.c or wct4xxp.c and recompile, or you can specify it as a kernel module option at runtime.

SIP DTMF Detection Problems
If you are having problems sending DTMF digits amd are using a SIP phone, make sure the dtmfmode they have set is the same on the phone and in Asterisk. Also make sure you are not sending both inband and out-of-band (rfc2833) tones.

Q22, I am getting error messages about PCI Master Aborts. What is wrong?

This is a very rare case. When your computer's PCI subsystem experiences serious problems with OpenVox's cards upon initialization of the card, Linux will print out scrolling "PCI Master Abort" messages. What you should do is go into your system's BIOS, and turn off your motherboard's PNP (plug and play) feature. If this does not resolve your issue, You should contact OpenVox support.

Q23, Why is there a pause after the last DTMF digit?

If you are experiencing a delay or pause before the last DTMF digit is dialed on a Zaptel line, this is because you have echotraining enabled in your zapata.conf. The echotraining is done just before the last digit is dialed, thus the reason for the pause. To fix this you can either set a lower value for echotraining or turn it off completely.

Q24, Why am I getting a clicking noise?

If a clicking noise is present when dialing through an FXO or when getting dialtone from an FXS, this is cause by echotraining. Turn it off to get rid of the clicking. The click is necessary for the echotraining.

Q25, list of asterisk pbx distributions:

www.elastix.org
www.trixobx.org

Q26, How can you install asterisk with Debian Ubutun

http://www.debianhelp.co.uk/asterisk.htm
http://www.itinfusion.ca/asterisk/howto-installing-asterisk-on-debian-etch/
http://www.voip-info.org/tiki-index.php?page=Asterisk+Linux+Debian
http://www.voip-info.org/wiki/view/Running+Asterisk+on+Debian
http://www.voip-info.org/wiki/view/Asterisk+Linux+Ubuntu
http://ubuntuforums.org/showthread.php?t=136785

Q27, How can you install asterisk with Fedora?

http://www.voip-info.org/wiki/view/Asterisk+Linux+Fedora
http://www.asteriskguru.com/

Q28, How can you install asterisk with SuSe?

http://www.asteriskguru.com/tutorials/asterisk_installation_compilation_suse.html
http://voip-manager.net/installation-linux-asterisk.php

Q29, install asterisk with Free BSD

http://www.voip-info.org/wiki/view/Asterisk+FreeBSD
http://www.voip-info.org/wiki/view/FreeBSD+zaptel

Q30, List of Asterisk OS Platforms

http://www.voip-info.org/wiki/view/Asterisk+OS+Platforms

Q31, Centos with asterisk

http://www.voip-info.org/wiki/view/CentOS+5.2+and+Asterisk+1.6.x+installation
http://www.voip-info.org/wiki/view/CentOS+5+and+Asterisk+1.4.x+installation
http://www.voip-info.org/wiki/view/Asterisk+Linux+Centos

Q32, A1200P "TRUNK Dial failed due to CONGESTION" Problem

please refer this link:
http://www.openvox.cn/bbs/viewthread.php?tid=739&extra=page%3D1

Q33, A1200P Installation on Ubuntu 8.10 Server

if you have a installation problem with A1200P/A800P,
please refer this:http://bbs.openvox.cn/viewthread.php?tid=819&extra=page%3D1

Q34, Can't retrieve Taiwan's CID

please refer this for your problem:
link:http://bbs.openvox.cn/viewthread.php?tid=726&extra=page%3D3

Q35, FXO sends the digits of speed

if you want to add speed dialup for FXO, please refer this:
http://bbs.openvox.cn/viewthread.php?tid=666&extra=page%3D3

Q36, Trick to solve buffer re-sync issue of A1200P/A800P

if your system keeps flushing the "buffer re-sync problems"
please refer this link:
http://bbs.openvox.cn/viewthread.php?tid=405&extra=page%3D6

Q37, How do you report a problem

In order to solve customer's problems very effectively and efficiently,
when seeking a help from us, please give us:
1) versions of kernel and Linux distribution
2) versions of asterisk and zaptel/dahdi
3) the name of cards used in your system
4) debug and error information from your system and asterisk
5) sending us zaptel(zaptel.conf and zapata.conf) or dahdi (system.conf and chan_dahdi.conf)
configuration files and extension.conf
6) after loading the driver, run the command: demsg and send the information to us
7) sending us the result of the command: cat /proc/interrupts
8) sending us the message of asterisk console when you making a call
9) inform the protocols you are using in your system
10) send us a working ssh account with root permission if you need us to check the system.
11) make a backup for your important files
12) describe the problem in details
13) sending the serial numbers of OpenVox's cards

Q38,bug: FXO can not call out!

The problem is this:
1) I cannot make outbound calls on an FXO card (Using FXSKS signalling)until I've received an incoming call
2) resetting the hookstate to offhook(A single ring is good enough),
or alternatively, disconnecting and reconnecting the telephone line.
please refer this link:
http://bbs.openvox.cn/viewthread.php?tid=740&extra=page%3D2

Q39,FATAL: Module wctdm 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 is under /lib/modules/2.6.XX/extra

Q40,FATAL: Module opvxa1200 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 opvxa1200.ko is under /lib/modules/2.6.XX/extra

Q41,Tools for wctdm and opvxa1200

you can use these tools to test the wctdm and opvxa1200
1) zttest
http://www.asteriskguru.com/tutorials/pci_irq_apic_tdm_ticks_te410p_te405p_noise.html
2) zttool
http://www.voip-info.org/wiki/view/Asterisk+zttool
3) ztmonitor
http://www.voip-info.org/wiki/view/Asterisk+zapata+gain+adjustment
4) fxotune
http://www.voip-info.org/wiki/view/Asterisk+fxotune
http://kb.digium.com/entry/134/

Q42,check information of wctdm.ko/opvxa1200.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

Q43, How to debug wctdm or opvxa1200

When loading the wctdm or opvxa1200 with a debug mode,
please loadding the driver in this way:
modprobe wctdm debug=1 // open the debug and check the /var/log/message

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

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

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

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

Q46, spinlock.h error with RHEL 4

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

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

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

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

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

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

Q51, DID YOU REMEMBER TO PLUG IN THE HD POWER CABLE TO THE TDM400P??

please check from here:
http://www.openvox.com.cn/bbs/viewtopic.php?t=538&sid=cae3adbe99e80f500d9c9ea7edb52bfb
http://www.openvox.cn/download/other_docs/A800P_A1200P_FAQ(Chinese).pdf

Q52, How to install Octasic SoftEcho

please refer these links:
http://www.openvox.cn/download/user_manuals_english_version/Octvqeug_5000.pdf
http://www.octasic.com/en/products/softecho/softecho_asterisk.php
http://www.octasic.com/en/products/softecho/support.php

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

Q54, Howto: OSLEC echo canceling + DAHDI 2.1.0.4 + Asterisk 1.4

please refer this:
http://www.asterisk.org/forum/viewtopic.php?p=125314&sid=9515c7b03cb14dc698e89467c3d49a86

Q55, Difference between zaptel and dahdi

please refer these links:
http://www.voip-info.org/wiki/view/DAHDI
http://docs.tzafrir.org.il/dahdi-linux/
http://docs.tzafrir.org.il/dahdi-tools/

Q56, Tonezones for wctdm and opvxa1200

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

Q57, 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)

Q58, the list of opermode

when loading the driver wctdm/opvxa1200,
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,
}, };

Q59, Callerid with DTMF and FSK

please refer these links:
http://www.ainslie.org.uk/callerid/cli_faq.htm
http://www.asteriskguru.com/tutorials/calleridall_function.html
https://issues.asterisk.org/view.php?id=7787
http://asterisk.pbx.in/callerid-standards
http://kb.digium.com/entry/3/

Q60, Why are you unable to call out with Asterisk 1.4.22?

If you are using wctdm or opvxa1200 with Zaptel and Asterisk 1.4.22 then there is a known issue with outbound calls. The reason you are not able to call out is because Asterisk 1.4.22 has a new feature which detects if a analog line is plugged in or not, but this feature only works with Dahdi. So to fix the issue you can do one of the following.
edit the file under /asterisk-1.4.22、channels/chan_dahdi.c" find this line

  1. ifdef DAHDI_CHECK_HOOKSTATE return 0;
  2. else return 1;

Change the "0" to a "1"

  1. ifdef DAHDI_CHECK_HOOKSTATE return 1;
  2. else return 1;

Q61, Sound quality issue with wctdm and opvxa1200

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

Q62, Echotraining and OSLEC

if you use the OSLEC, you must disable the echotraining.
otherwise, the channel will be silent.

Q63, Far side disconnected with disconnect supervisions

possible solutions:
1) Your PSTN provider uses voltage/battery drop for disconnect supervision,
pleas try to edit DCT in zaptel.h to 100 ms or higher.
2) If you PSTN provider provides reverse polarity/battery
disconnect supervision:
hanguponpolarityswitch=yes
answeruponpolarityswitch=yes
3) If your PSTN provider has disconnect/busy tone disconnect supervision
busydetect=yes busycount=6
or try to callprogress, and set your progzone to your country code in zapata.conf

Q64, Cabling for wctdm and opvxa1200

wctdm/opvxa1200 uses RJ11 cable. please refer this:
http://www.tech-faq.com/rj-11.shtml
http://en.wikipedia.org/wiki/RJ11,_RJ14,_RJ25

Q65, Splitter for A1200P/A800P

http://openvox.cn/products/show.php?itemid=120&lang=2

Q66, Power supply for for wctdm and opvxa1200

If you use FXS with wctdm/opvxa1200, you MUST use
12v power supply(4 pin Molex power cable) for FXS, please refer this:
http://www.playtool.com/pages/psuconnectors/connectors.html#peripheral
http://en.wikipedia.org/wiki/Computer_power_supply

Q67, Configuring systems for the UK (various country specific quirks)

if users are in UK, please check the cable and callerid set from here: Interfacing with the UK Analogue telephone network This is a how to for connecting your fonicavoip PABX to analogue phone lines in Britain. Our signalling protocols on analogue phone lines date back to the days of the Government owned General Post Office, and are different from those used in America or mainland Europe. Wiring

The UK uses a unique telephone socket called a BS6312 socket or "BT socket", which is different from the RJ11 plug commonly used elsewhere. To connect most line cards to the telephone line you need a BT plug to RJ11 plug connector, where pins 2 and 5 of the BT plug are connected to the inner two pins (2 and 3) of the RJ11 plug. Most phone leads supplied for recent analogue modems are wired in this way but beware - there are two kinds of these leads on the market - one commonly used with older (1990s) BT phones and modems has the phone line on the outer two pins of the RJ11. This will not at all with single line RJ11 sockets found on line cards! Caller ID

On BT lines, Caller ID in the UK is sent before the first ring and after a polarity reversal. These lines must be inserted into your Zaptel or DAHDI conf file so UK caller ID works properly.

usecallerid=yes

cidsignalling=v23

cidstart=polarity Featurelines

These are the UK version of Centrex, and BT often tend to encourage small businesses to take these on on a long term contract with fairly competitive rates. They have the issue that even with a standard phone connected, the trunk requires 9 to be dialled to get an "outside line" as it you were already connected to a PABX - also incoming caller ID is prefixed with this 9.

For an extra charge BT offer "internal extensions" which can be in different sites provided they are connected to the same Telephone Exchange. These usually are two digits long and start with "Extension 20"

With a normal PABX connected to these lines you would need to dial 9 'twice' to get an outside line (or whatever other access code is in use). This is a hassle, and could potentially even lead to false 999 (emergency) calls!

However FreePBX's advanced routing can be used to ensure users only have to dial 9 once for the outside line - and can still make use of the internal extensions - thus getting the best of both worlds.

1. In Trunks

set up your ZAP trunks connected to the Centrex/PABX line for your normal PSTN dial plan but coded to add "9" as if you were dialling from an extension.

For instance

9+999

9+112

9+NXXXXX

9+0.

9+1.


2. In Outbound Routes

Set up 9_outside to point to these trunks


9|.


Now your end users only have to dial "9" once and will get routed to outside line provided it matches your dialplan in trunks.

Now for the Centrex/PABX "extensions":

Choose another number as your "inter-PABX" code. I have picked "8" (as traditionally thats how many British phone systems have been set up).

Set up an outbound route to look for your Centrex/PABX extension dialling pattern after the 8 (remember that my extensions were 20-24)


8|2[01234]


Point this route to the Centrex/PABX trunks on the ZAP channel - and anything prefixed with 8 will be dialled as an "internal" extension.

Incidentally If you don't want to move your users to a longer extension digit length and the Centrex/PABX extensions are all in the same number range you can of course tweak the route to just route all numbers beginning with 2 for instance via this method, provided you don't have any FreePBX extensions in the same number range... BT Line testing and a caveat with current versions of DAHDI (as at 2009-03-15)

Many BT lines are automatically tested every night. This is to test if the cable between the Telephone Exchange and your NTE5 (the line socket) has been damaged. To do this, equipment within the exchange removes the normal dial tone and -50 volts DC (battery) from your line and substitutes it with a variety of DC and AC signals.

This appears to Zap/DAHDI hardware as a series of battery drops and line reversals

Previous versions of zaptel/DAHDI did not check the telephone line for battery voltage. This meant that the reversals picked up from the testing sequence are treated as a a "pre-ring" state (before caller ID) but time out harmlessly, so the channel was only shown unavailable for the duration of the line test (which is a sensible thing to happen).


Newer versions of DAHDI do check the line for battery. This is also sensible, as it stops Asterisk dialling into an unconnected telephone circuit.


Unfortunately, the way Asterisk is currently coded means that if the system is configured for the UK caller ID protocol, any on hook polarity reversal is treated as a precursor to the telephone ringing, when in fact (according to BT's own specifications) line reversals can randomly happen at any time.

Another piece of code inserted to make Asterisk ignore alarms at this time has inadvertently caused the combination of battery drops and reversals to be picked up as a permanent line fault.

This is under investigation at the link below, with a patch available for chan_dahdi.c

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

the original link from: http://www.fonicaprojects.com/wiki/index.php/Configuring_systems_for_the_UK_%28various_country_specific_quirks%29

Q68, User has to make incoming call first, then you can make outgoing calls.

certain versions of asterisk does not detect offhook correctly, there are two ways to use to make your system working as normal status. 1) plug out the fxo cable, then plug back that 2) you have to call in, then you can make outgoing calls. to solve this problem, you have to patch asterisk. this is a patch for asterisk1-6.2.2: --- org_chan_dahdi.c 2010-02-04 21:33:34.000000000 -0500 +++ new_chan_dahdi.c 2010-02-04 21:35:48.000000000 -0500 @@ -198,7 +198,7 @@

 * before dialing on it.  Certain FXO interfaces always think they're out of
 * service with this method however.
 */

-/* #define DAHDI_CHECK_HOOKSTATE */ +#define DAHDI_CHECK_HOOKSTATE

/*! \brief Typically, how many rings before we should send Caller*ID */

  1. define DEFAULT_CIDRINGS 1

@@ -10685,12 +10685,16 @@

                               /* When "onhook" that means no battery on the line, and thus
                                 it is out of service..., if it's on a TDM card... If it's a channel
                                 bank, there is no telling... */

+#ifdef DAHDI_CHECK_HOOKSTATE

                               if (par.rxbits > -1)
                                       return 1;
                               if (par.rxisoffhook)
                                       return 1;
                               else
                                       return 0;

+#else + return 1; +#endif

                       } else if (par.rxisoffhook) {
                               ast_debug(1, "Channel %d off hook, can't use\n", p->channel);
                               /* Not available when the other end is off hook */

more details: https://issues.asterisk.org/file_download.php?file_id=23171&type=bug

Q69, To get the quick support, what information about the system I should send?

  • Versions of kernel and Linux distribution
  • Versions of asterisk and zaptel/dahdi
  • Model of OpenVox products
  • Debug and error information from your system and asterisk
  • Zaptel(zaptel.conf and zapata.conf) or dahdi (system.conf and chan_dahdi.conf) configuration files and extension.conf if your have trouble with dialplan
  • After loading the driver, run the command: demsg and send the information to us
  • Output of the command: cat /proc/interrupts
  • Message in asterisk console when you making a call, if you have trouble to drop/receive calls.
  • Protocols you want to use(FXS,FXO,PRI..)
  • Ssh account with root permission if you need us to check the system.
  • Make a backup for your important files
  • Describe the problem in details
  • Serial numbers of OpenVox's products

Q70, How to use fxstest tool for DAHDI FXS adapters?

Hardware Environment:A800P(2FXS+1FXO),A400P(2FXS+1FXO),BBK HCD007(6082)TSDL
Software Environment:Centos 5.5,dahdi-linux-complete-2.3.0.1+2.3.0
1.Compiling and installation
1)Please input following commands:
#cd /usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/tools
#make menuselect
Select "fxstest" in the menu Then Save&Exit.

2)Beginning to compile dahdi.Input commands like below:
#cd /usr/src/dahdi-linux-complete-2.3.0.1+2.3.0
#make && make install && make config

3)Reloading the drivers.Perform the following command:
#service dahdi stop
#modprobe –r wctdm
#modprobe –r opvxa1200
#modprobe –r dahdi
#modprobe dahdi
#modprobe opvxa1200 opermode=YOUR COUNTRY
#modprobe wctdm opermode= YOUR COUNTRY
#dahdi_genconf
#dahdi_cfg –vvv(If there is no error,then installed OK)
#dahdi_scan(It prints information about DAHDI spans in the system.For analog spans it provides a list of channels.)

2.Beginning to test
All of thoses tests operate on a single dahdi channel which has to be an FXS port,and must not be in use by Asterisk or any other program.Analog adapters should be intended to connect phones. The command has two mandatory parameters.The first parameters is the device file to operate on.It is typically /dev/dahdi/NN,a device file under /dev/dahdi. The second parameter is the name of the command to run on that channel.

1)Reporting voltages:
#fxstest /dev/dahdi/1 stats //A800P volts of channel 1

TIP: -5.6400 Volts 
RING: -54.1440 Volts 
VBAT: -62.7920 Volts

#fxstest /dev/dahdi/11 stats //A400P volts of channel 3

TIP: -5.6400 Volts
RING: -54.8960 Volts
VBAT: -63.9200 Volts

2)Dumping ProSLIC registers:
#fxstest /dev/dahdi/1 regdump //A800P registers of channel 1

Direct registers: 
  0. 05    1. 28    2. 18    3. 00    4. 18    5. 00    6. 00    7. 00  
  8. 00    9. 00   10. 08   11. 33   12. 80   13. 10   14. 00   15. 00  
 ….
 
Indirect registers: 
  0. 55c2    1. 51e6    2. 4b85    3. 4937    4. 3333    5. 0202  
  6. 0202    7. 0198    8. 0198    9. 0611   10. 0202   11. 00e5  
….

3)Playing a series of tones:
#fxstest /dev/dahdi/1 tones
Then picking up the phone,you could hear of a series of tones.Press Ctrl+C to stop this command.

4)Creating a dtmf cid spill without polarity reversal:
#fxstest /dev/dahdi/1 dtmfcid

Going to send a set of DTMF tones >A5551212C<
Phone is ringing
Ringing Done

5)Testing polarity reversal(This test must be followd in creating a dtmf cid):
#fxstest /dev/dahdi/1 polarity

Twiddling polarity...
Polarity is forward...
Polarity is reversed...
Polarity is forward...

6)Sending a sequence of dtmf tones:
#fxstest /dev/dahdi/1 dtmf "12324" 70

Going to send a set of DTMF tones >12324<
Using a duration of 70 mS per tone

Then you can see the set of DTMF tones”12324” sent on the phone. Note:The duration should be 70ms or above to display whole sequence on the phone.

7)Toggling VMWI lamp(A800P not supported):
#fxstest /dev/dahdi/11 vmwi

Twiddling vmwi ...
Set 1 Voice Message...
Set 2 Voice Messages...
Set No Voice messages...

#fxstest /dev/dahdi/11 hvdc

Twiddling hvdc ...
Set 1 Voice Message...
Set 2 Voice Messages...
Set No Voice messages...

#fxstest /dev/dahdi/11 neon

Twiddling neon ...
Set 1 Voice Message...
Set 2 Voice Messages...
Set No Voice messages...