Troubleshooting of PRI 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/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, 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 pri is and active(leds are in green).
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
please check the pri status, it MUST be up and active
if is empty or no such command, you should check your zapata.conf
4) Make sure dmesg shows without any error
5) Make sure the pri is up and active without any error
6) Make sure the physical connection is well established
7) You maybe recompile your zaptel and asterisk again.

Q4, How can you set the digital card for your country?

To set the 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

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

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

Q7, Sound Quality Problems with Digital cards

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

Q8, How can you compile asterisk with dahdi for D110P/D210P/D410P

please refer these links:
http://bbs.openvox.cn/viewthread.php?tid=576&extra=page%3D1
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

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

Q10, 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/

Q11, 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/

Q12, 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/
good link:
http://wiki.telesoft.ro/mediawiki/index.php/AsteriskSoundProbemWithDigium.html

Q13, 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 vpmdtmf support to 0 in 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.

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

Q15, list of asterisk pbx distributions

www.elastix.org
www.trixobx.org
http://www.briker.org/
http://www.easyasterisk.it/
http://pbxinaflash.org/

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

Q17, How can you install asterisk with Fedora?

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

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

Q19, install asterisk with Free BSD

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

Q20, List of Asterisk OS Platforms

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

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

Q22, digital cards with "TRUNK Dial failed due to CONGESTION" Problem

You must check:
1) your driver is loaded properly.
2) there is no error running dmesg with cards.
3) under asterisk console, run: zap show channels or dahdi show channels, make sure that there is no error
4) under asterisk console, run: pri show spans, make sure the spans are up and active
5) make sure your dialplan is set to a right channel.

Q23, How do you report a problem

In order to solve customer's problems very effective and efficiency,
when seeking a help from us, please give these information:
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) sending us a working ssh account with root permission if you need us to check the system.
11) making a backup for your important files
12) describing the problem in details

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

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

Q26, Tools for PRI cards

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

Q27,check information of wctdm.ko/wct4xxp.ko

Under /lib/modules/2.6.18-128.el5/misc
run command: modinfo wct4xxp.ko

Q28, How to debug wct4xxp

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

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

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

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

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

Q31, spinlock.h error with RHEL 4

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

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

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

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

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

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

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

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

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

Q39, 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/

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

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

Q42, 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;

Q43, Missing libpri

Symptom: chan_zap fails to load (no 'zap' in the CLI). In the logs you see the error:

 chan_zap.c: Unknown signalling method 'pri_cpe'

Cause: chan_zap.so in Asterisk was built without support for libpri. libpri was not installed when you ran ./configure before building asterisk.

Fix: Rebuild asterisk and make sure libpri is supported.

$ strings channels/chan_zap.so | grep pri_cpe
pri_cpe

Q44, I have an E1/PRI line, incoming calls are working but outgoing calls are not working, what is wrong?

try to set:
pridialplan= local (or unknown, private, national, and international)

Q45, How to get more debug information

under asterisk console, run : pri intense debug span X, X is span number

Q46, T1/E1 Clock Synchronization

TE1 Clock synchronization is used to propagate a single clock source over the T1/E1 ports on a single card.
Before configuring your system you must identify which ports should be in NORMAL (slave) clock mode and which should be in MASTER clock mode.
All ports connected to TELCO MUST be in NORMAL mode,
because Telco is ALWAYS MASTER clock.
Example:
zaptel->Port 1 connected to TELCO // port 1 MUST be Normal(slave) clock mode
zaptel->Port 2 connected to channel bank or back to back to another T1/E1
device. In this scenario Port2 must be configured as CLOCK MASTER.

Q47, Cabling for PRI cards

the pin, 1,2,4,5 are used. ping 1 and 2 are used for rx; pin 4 and 5 are used for tx
please check from these links:
http://www.pbx.in/digium-te110p-loopback-cable-india-howto
http://www.chebucto.ns.ca/Chebucto/Technical/Manuals/Max/max6000/gs/cables.htm
http://help.pbxtra.com/Troubleshooting/How_to:_Perform_a_Pattern_Loopback_Test
http://www.voip-info.org/wiki/view/ztloop
http://help.pbxtra.com/Troubleshooting/T1_Cross-over_Cable

Q48, PRI cards working with MFC/R2

please refer these links:
http://www.voip-info.org/wiki/view/Asterisk+MFC+R2
http://zarzamora.com.mx/archivo-historico/48

Q49, PRI cards working with SS7

http://www.voip-info.org/wiki/view/Asterisk+SS7
http://www.cesnet.cz/doc/techzpravy/2007/asterisk-ss7-performance/asterisk-ss7-performance.pdf
http://www.openvox.cn/download/other_docs/ss71.pdf
http://www.pdf-search-engine.com/asterisk-ss7-pdf.html
http://www.openvox.cn/download/other_docs/Test%20chan_ss7.pdf
http://www.astricon.net/2008/glendale/web/presentations/>/Introduction_to_SS7_and_Asterisk_MFredrickson.pdf
中国ss7:http://bbs.openvox.cn/forumdisplay.php?fid=12

Q50, Resistance of PRI cards

the resistance of PRI cards from 75 OHM to 120 OHM.

Q51, BNC connector of PRI cards

If you requires a BNC connector, OpenVox will provides a BNC connector(Y cable)with PRI cards.
the longer cable is for TX
the shorter cable is for RX

Q52, 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.

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

Q54, Signalling requested on channel 1 is E & M Wink but line is in PRI Signalling signalling.

If you see an error similar to this one:
Jul 14 14:06:58 ERROR[19635]: chan_zap.c:6593 mkintf:
Signalling requested on channel 1 is E & M Wink but line is in PRI Signalling signalling.
That means your zaptel.conf seems to be configured for PRI signalling (you defined B-channels and D-channels)
and in zapata.conf you didnt not put signalling=pri_cpe or pri_net, but em_w

Q55, Signalling requested on channel 24 is PRI Signalling but line is in Unknown signalling 896 signalling

Signalling requested on channel 24 is PRI Signalling but line is in Unknown
signalling 896 signalling
you defined in zapata.conf that channel 24 is also a b channel.
e.g.: channels = 1-24, while in zaptel.conf you had a line: dchannel=24
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.


Q56, 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.

Q57, How do I run a pattern loopback test (patlooptest) on my E1/T1 card?

OpenVox's pri cards can be tested using patlooptest. This test transmits a bit pattern and listens for the same bit pattern to be received, comparing the results. To run the test, plug an E1/T1 loopback cable into the port to be tested. here, the pin assignment of lookback cable is 1->4, 2->5. this is a example for how to make a lookback cable:
http://www.ortizonline.com/publications/april2004/loopback.htm

1. With the system powered off, confirm that the board jumpers are set appropriately for E1 mode or T1 mode. (Refer to the user's manual for the interface card.)

2. Use zttool (or dahdi_tool) to confirm that the span is "OK" (green alarm):

  zttool

or

  dahdi_tool

3. Make a backup of /etc/zaptel.conf (or /etc/dahdi/system.conf).

4. Configure the span(s) as follows.

For E1 mode, /etc/zaptel.conf (or /etc/dahdi/system.conf) should contain:

  span=1,0,0,ccs,hdb3,crc4
  clear=1-31
  # for TE2xx and TE4xx, uncomment the following two lines
  # span=2,0,0,ccs,hdb3,crc4
  # clear=32-62
  # for TE4xx, uncomment the following four lines
  # span=3,0,0,ccs,hdb3,crc4
  # clear=63-93
  # span=4,0,0,ccs,hdb3,crc4
  # clear=94-124

For T1 mode, /etc/zaptel.conf (or /etc/dahdi/system.conf) should contain:

  span=1,0,0,esf,b8zs
  clear=1-24
  # for TE2xx and TE4xx, uncomment the following two lines
  # span=2,0,0,esf,b8zs
  # clear=25-48
  # for TE4xx, uncomment the following four lines
  # span=3,0,0,esf,b8zs
  # clear=49-72
  # span=4,0,0,esf,b8zs
  # clear=73-96

5. Use ztcfg (or dahdi_cfg) to configure the channels:

  ztcfg -vvv

or

  dahdi_cfg -vvv

6. Make the tests, including patlooptest:

  cd /usr/src/zaptel/
  make tests

or

  cd /usr/src/dahdi-linux-complete-N.N.N+N.N.N/tools/
  make tests

7. Run patlooptest:

  ./patlooptest /dev/zap/1 300
  Going for it...

or

  ./patlooptest /dev/dahdi/1 300
  Going for it...

(To run patlooptest on each of four E1 spans:

  ./patlooptest /dev/zap/1 300
  ./patlooptest /dev/zap/32 300
  ./patlooptest /dev/zap/63 300
  ./patlooptest /dev/zap/94 300

or

  ./patlooptest /dev/dahdi/1 300
  ./patlooptest /dev/dahdi/32 300
  ./patlooptest /dev/dahdi/63 300
  ./patlooptest /dev/dahdi/94 300

To run patlooptest on each of four T1 spans:

  ./patlooptest /dev/zap/1 300
  ./patlooptest /dev/zap/25 300
  ./patlooptest /dev/zap/49 300
  ./patlooptest /dev/zap/73 300

or

  ./patlooptest /dev/dahdi/1 300
  ./patlooptest /dev/dahdi/25 300
  ./patlooptest /dev/dahdi/49 300
  ./patlooptest /dev/dahdi/73 300

)

The first parameter to patlooptest is the channel on which to run the test (e.g., /dev/zap/1 or /dev/dahdi/1 ). The test should be run on the first channel of the span in question.

The second parameter is an optional timeout (e.g., 300), measured in seconds.

patlooptest should complete without displaying any errors. If there are errors, it may indicate that the card or port is bad. However, errors could also be caused by interrupt misses or a faulty loopback plug.

If patlooptest does not terminate after the timeout interval, then the card is probably not taking any interrupts.
original link is from:http://kb.digium.com/entry/138/

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

Q59, How do I change the type of line from E1 to T1/J1 without using jumpers?

If you do not have physcial access to the card, and you need to set it in T1 or E1 mode you can pass a special option when loading the module to accomplish this task:

insmod wct4xxp t1e1override=0xFF

This will set all four spans into E1 mode.

insmod wct4xxp t1e1override=0x00

This will set all four spans into T1 mode.

If you need some spans T1 and some E1 use the following guidelines.

The settings of the spans must be passed as a bitmask in the module paramater. To create the bitmask use the table below adding the value of the numbers corrisponding to the spans you wish to enable. span value 1 1 2 2 3 4 4 8

So to enable spans 1 and 4 you would call modprobe like so:

modprobe wct4xxp t1e1override=0x09

As you can see I added 1 and 8 to get 9. Remember if you pass this value in HEX to format it properly.

To make spans 1, 2, and 4 E1 spans, you would use the following parameter:

... t1e1override=0x0B or ... t1e1override=11

url: http://kb.digium.com/entry/1/121/

Q60 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

Q61 How to install the openR2 with D115P on trixbox-2.8

1. Use command: yum install bison bison-devel ncurses ncurses-devel zlib zlib-devel openssl openssl-devel gnutls-devel gcc gcc-c++

2. copy this script to /usr/src/openvos.sh,then run the script to install the DE115P

cd /usr/src
wget http://downloads.openvox.cn/pub/drivers/dahdi-linux/openvox_dahdi-linux-2.2.0.tar.gz
tar -xvzf openvox_dahdi-linux-2.2.0.tar.gz
cd dahdi-linux-2.2.0
make
mkdir -p /lib/modules/`uname -r`/dahdi/opvxd115
cp /usr/src/dahdi-linux-2.2.0/drivers/dahdi/opvxd115/opvxd115.ko /lib/modules/`uname -r`/dahdi/opvxd115/
depmod -a
cd ..
wget http://downloads.openvox.cn/pub/firmwares/opvx-dahdi-fw-oct6114-032-1.07.01.tar.gz	
tar -xzvf opvx-dahdi-fw-oct6114-032-1.07.01.tar.gz
cp dahdi-fw-oct6114-032.bin /lib/firmware/
mkdir -p /usr/lib/hotplug/firmware/
mv dahdi-fw-oct6114-032.bin /usr/lib/hotplug/firmware/
sed '/ztqoz\\/i\\t  }elsif ($fqn =~ m{\\b(D115)\/.*}) {\n\t\t$type = "PRI";' /usr/lib/perl5/site_perl/5.8.8/Dahdi/Chans.pm > Chans.pm
mv Chans.pm /usr/lib/perl5/site_perl/5.8.8/Dahdi/
sed "/Wildcard TE122/i\ \t\t'D115P\/D115E \\\(PCI\/PCI-E\\\) Card'," /usr/lib/perl5/site_perl/5.8.8/Dahdi/Span.pm > Span.pm
mv Span.pm /usr/lib/perl5/site_perl/5.8.8/Dahdi/
sed "/d161:2400/i\ \t'1b74:0115'             => { DRIVER => 'opvxd115',   DESCRIPTION => 'OpenVox D115P/D115E '}," /usr/lib/perl5/site_perl/5.8.8/Dahdi/Hardware/PCI.pm > PCI.pm
mv PCI.pm /usr/lib/perl5/site_perl/5.8.8/Dahdi/Hardware/
echo "opvxd115" >> /etc/dahdi/modules

3. Download the openr2-1.3.tar.gz in /usr/src, use command:

./configure –prefix=/usr
make && make install

4. Download the asterisk-1.6.0.6 from www.asterisk.org

5. Download the the patch file from http://code.google.com/p/openr2/downloads/list?can=1&q=&colspec=Filename+Summary+Uploaded+Size
/usr/src/asterisk-1.6.0.6/openr2-asterisk-1.6.0.6.patch (download here)
then use command in /usr/src/asterisk-1.6.0.6:
patch -p0 < openr2-asterisk-1.6.0.6.patch

6. Download the autoconf-2.60 from http://www.gnu.org/software/autoconf/, extract autoconf-2.6.tar.gz, then compile it

./configure
make && make install

7. Use command: yum install automake

8. Use command in /usr/src/asterisk-1.6.0.6/:

./bootstrap.sh
./configure
make  && make install

9. /etc/dahdi/system.conf

span=1,1,0,cas,hdb3
cas=1-15:1101
dchan=16
cas=17-31:1101
loadzone        = mx
defaultzone     = mx

10. Please add this file in /etc/asterisk/chan_dahdi.conf
http://openr2.googlecode.com/files/chan_dahdi_or_zapata.conf.sample

11. In asterisk CLI use command: mfcr2 show channels

trixbox1*CLI> mfcr2 show channels
Chan Variant Max ANI Max DNIS ANI First Immediate Accept Tx CAS   Rx CAS
   1 MX      10      4        No        No               IDLE     0x00
   2 MX      10      4        No        No               IDLE     0x00
   3 MX      10      4        No        No               IDLE     0x00
   4 MX      10      4        No        No               IDLE     0x00
   5 MX      10      4        No        No               IDLE     0x00
   6 MX      10      4        No        No               IDLE     0x00
   7 MX      10      4        No        No               IDLE     0x00
   8 MX      10      4        No        No               IDLE     0x00
   9 MX      10      4        No        No               IDLE     0x00
  10 MX      10      4        No        No               IDLE     0x00
  11 MX      10      4        No        No               IDLE     0x00
  12 MX      10      4        No        No               IDLE     0x00
  13 MX      10      4        No        No               IDLE     0x00
  14 MX      10      4        No        No               IDLE     0x00
  15 MX      10      4        No        No               IDLE     0x00
  17 MX      10      4        No        No               IDLE     0x00
  18 MX      10      4        No        No               IDLE     0x00
  19 MX      10      4        No        No               IDLE     0x00
  20 MX      10      4        No        No               IDLE     0x00
  21 MX      10      4        No        No               IDLE     0x00
  22 MX      10      4        No        No               IDLE     0x00
  23 MX      10      4        No        No               IDLE     0x00
  24 MX      10      4        No        No               IDLE     0x00
  25 MX      10      4        No        No               IDLE     0x00
  26 MX      10      4        No        No               IDLE     0x00
  27 MX      10      4        No        No               IDLE     0x00
  28 MX      10      4        No        No               IDLE     0x00
  29 MX      10      4        No        No               IDLE     0x00
  30 MX      10      4        No        No               IDLE     0x00
  31 MX      10      4        No        No               IDLE     0x00

Q62 How to use opvx-update?

Here taking D430P for an example to introduce how to use opvx-update.Note:This tool also applys to G400P,A2410P,D230 and D130.

1.Downloading opvx-update.

cd /usr/src
wget [http://downloads.openvox.cn/pub/firmwares/opvx-update-1.2.0_20110321.tar.gz http://downloads.openvox.cn/pub/firmwares/opvx-update-1.2.0_20110321.tar.gz]  
tar –zxvf opvx-update-1.2.0_20110321.tar.gz 

2.Running

1)Check the card information:

lspci -vvx
----------------------------------------------------------------------------------------------
01:02.0 Class ff00: Digium, Inc. Unknown device 1420 (rev 01)
Subsystem: Unknown device 0005:0000
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64, Cache Line Size: 16 bytes
Interrupt: pin A routed to IRQ 11
Region 0: Memory at dedf0000 (32-bit, non-prefetchable) [size=32K]
00: 61 d1 20 14 17 00 00 04 01 00 00 ff 04 40 80 00
10: 00 00 df de 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 01 00 00
-----------------------------------------------------------------------------------------------

User can change pin A to B,C or D."0b 01" is corresponding to "pin A routed to IRQ 11".The congruent relationship is below:

01:pin A

02:pin B

03:pin C

04:pin D

2) Now start the script and change pin A to pin C.

cd /usr/src/opvx-update-1.2.0
./epcs
------------------------------------------------------------------------
########################################################################
#                 OpenVox EPCS Flash Update Utility                    #
#                               v1.2.0                                 #
#                   OpenVox Communication Co.,Ltd                      #
#          Copyright (c) 2009-2010 OpenVox. All Rights Reserved.       #
########################################################################
Note: Do not turn power OFF while the update process is continuing.
When the update is completed, the system will reboot.

1.Update the OpenVox D430 card (0000:01:02.0 d161:1420 pin A IRQ 11)
2.Update all OpenVox D430 cards
[1-2]:1

3)Choose if updating interrupt pin or not.If you choose no,it will update firmware only.

Do you want to change the interrupt pin (y/n)?y

4)Input a pin number.

Please input the pin number ([A|B|C|D]):C

5)Press ENTER key to reboot your system after updating successfully.

Reading epcs flash...
Reading epcs flash done
Erasing epcs flash...
Erasing epcs flash done
Writing epcs flash...
Writing epcs flash successfully

Press ENTER key to reboot your system.

6)Check the updated information.

lspci -vvx
---------------------------------------------------------------------------------------------
01:02.0 Class ff00: Digium, Inc. Unknown device 1420 (rev 01)
Subsystem: Unknown device 0005:0000
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64, Cache Line Size: 16 bytes
Interrupt: pin C routed to IRQ 10
Region 0: Memory at dedf0000 (32-bit, non-prefetchable) [size=32K]
00: 61 d1 20 14 17 00 00 04 01 00 00 ff 04 40 80 00
10: 00 00 df de 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 0a 03 00 00
-----------------------------------------------------------------------------------------------

User can see interrupt pin has been changed f rom pin A to pin C.And IRQ also has been changed f rom 11 to 10.