E1/T1 cards FAQ

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


Q2, How can you set the openvox 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

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

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

Q5, Sound Quality Problems with OpenVox cards

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


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

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

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

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

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

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

Q12, list of asterisk pbx distributions

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

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

Q14, How can you install asterisk with Fedora?

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

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

Q16, install asterisk with Free BSD

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

Q17, List of Asterisk OS Platforms

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

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

Q19, Openvox 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.

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

Q21,FATAL: Module opvxd115 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 opvxd115 is under /lib/modules/2.6.XX/extra or dahdi

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

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

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

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

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

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

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

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

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

Q28, spinlock.h error with RHEL 4

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

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

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

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



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



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


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

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

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

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

Q37, How to get more debug information

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

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

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

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

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

Q42, Resistance of PRI cards

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

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


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

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

 


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

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

Q48 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

Q49 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

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

Q51  how to make an T1/E1 loopback connector


Building a T1/E1 Loopback Connector.

In order to perform a loopback test of the E1/T1 port, a loopback plug (also known as loopback connector or loopback cable) is needed. An T1/E1 loopback connector can easily be made using a single RJ45 connector and two 4-in (10-cm) wires.

Materials Needed:

  • Unused RJ-45 plug
  • Two strands of Category 5 (Cat-5) wire, each 4-in (10-cm) long
  • Crimp tool for RJ-45

Procedure:

  1. Insert one end of wire 1 into pin 1 of the RJ45 connector. Note: To ensure a good connection, make sure that each wire goes all the way into the end of the plug.
  2. Insert the other end of wire 1 into pin 4 of the RJ45 connector.
  3. Insert one end of wire 2 into pin 2 of the RJ45 connector.
  4. Insert the other end of wire 2 into pin 5 of the RJ45 connector.
  5. Crimp the connector.
Now you have a small loopback cable: a single RJ45 connector with pin 1 connected to pin 4,
and pin 2 connected to pin 5.

After you install the loopback cable, check that the span is not in alarm:
For Asterisk systems:

  1. Run the dahdi_tool utility and check if the span reports any alarms or not. If any alarms are reported for the span then the T1/E1 loopback cable was made incorrectly (try another loopback cable), or the port is defective.

Q52  understanding the PRI capture


ITU-T Recommendation Q.931 is the ITU standard ISDN connection control signalling protocol, forming part of Digital Subscriber Signalling System No. 1. It  was designed for ISDN call establishment, maintenance, and release of network connections between two notes (or DTEs - Data terminal equipments) on the ISDN D channel.

Q.931 does not have a direct equivalent in the Internet Protocol stack, but can be compared to SIP.  Q.931 does not provide flow control or perform retransmission, since the underlying layers are assumed to be reliable and the circuit-oriented nature of ISDN allocates bandwidth in fixed increments of 64 kbit/s. Like TCP, Q.931 documents both the protocol itself and a protocol state machine.

A Q.931 frame contains the following elements: 
  • Protocol discriminator (PD) - Specifies which signaling protocol is used for the connection (e.g. PD=8 for DSS1)

  • Call reference value (CR) - Addresses different connections which can exist simultaneously. The value is valid only during the actual time period of the connection

  • Message type (MT) - Specifies the type of a layer 3 message out of the Q.931-defined Message type set for call control (e.g. SETUP). There are messages defined for the call setup, the call release and the control of call features.

  • Information elements (IE) - Specify further information which is associated to the actual message. An IE contains the IE name (e.g. bearer capability), their length and a variable field of contents.

Q.931 Messages

  • SETUP: This message is sent by the calling user to the network and by the network to the called user to initiate access connection establishment.

  • CALL PROCEEDING: This message is sent by the called user to the network or by the network to the calling user to indicate that requested call establishment has been initiated and no more call establishment information will be accepted.

  • ALERTING: This message is sent by the called user to the network, and by the network to the calling user, to indicate that called user alerting (or ringing) has been initiated

  • CONNECT: This message is sent by the called user to the network, and by the network to the calling user, to indicate call acceptance by the called user

  • CONNECT ACKNOWLEDGE: This message is sent by the network to the called user to indicate that the user has been awarded the access connection. It may also be sent by the calling user to the network to allow symmetrical access connection control procedures

  • DISCONNECT: sent to indicate a request to terminate the connection, by the end that seeks to terminate

  • RELEASE: This message is sent by the user or the network to indicate that the equipment sending the message has disconnected the channel (if any), and intends to release the channel and the call reference, and that the receiving equipment should release the channel and prepare to release the call reference after sending RELEASE COMPLETE

  • RELEASE COMPLETE: This message is sent by the user or the network to indicate that the equipment sending the message has released the channel (if any) and call reference. The channel is available for reuse, and the receiving equipment shall release the call reference

  • RESTART: This message is sent by the user or network to request the recipient to restart (i.e. return to an idle condition) the indicated channel(s) or interface

  • RESTART ACKNOWLEDGE: This message is sent to acknowledge the receipt of the RESTART message and to indicate that the requested restart is complete.

ISDN PRI Asterisk debug capture 

To understand the Asterisk logger output when PRI debug is enabled, first you need to know which side is sending which messages.
 
When Asterisk SENDS a message to the telco, the messages start with:
 
>
 
When Asterisk RECEIVES a message from the telco, the messages start with:
 
<
 
If Asterisk sends a call out to the telco, you will see something like this:
 
> Protocol Discriminator: Q.931 (8)  len=65
> Call Ref: len= 2 (reference 353/0x161) (Originator)
> Message type: SETUP (5)
> [04 03 80 90 a2]
> Bearer Capability (len= 5) [ Ext: 1  Q.931 Std: 0  Info transfer capability: Speech (0)
>                              Ext: 1  Trans mode/rate: 64kbps, circuit-mode (16)
>                              Ext: 1  User information layer 1: u-Law (34)
> [18 03 a9 83 85]
> Channel ID (len= 5) [ Ext: 1  IntID: Implicit, PRI Spare: 0, Exclusive Dchan: 0
>                        ChanSel: Reserved
>                       Ext: 1  Coding: 0   Number Specified   Channel Type: 3
>                       Ext: 1  Channel: 5 ]
> [1e 02 80 83]
> Progress Indicator (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location: User (0)
>                               Ext: 1  Progress Description: Calling equipment is non-ISDN. (3) ]
> [28 14 b1 44 69 67 69 75 6d 20 54 65 63 68 20 53 75 70 70 6f 72 74]
> Display (len=20) Charset: 31 [ Digium Tech Support ]
> [6c 0c 21 81 32 35 36 34 32 38 36 30 30 30]
> Calling Number (len=14) [ Ext: 0  TON: National Number (2)  NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
>                           Presentation: Presentation permitted, user number passed network screening (1) '2564286000' ]
> [70 08 a1 35 32 30 31 32 38 31]
> Called Number (len=10) [ Ext: 1  TON: National Number (2)  NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1) '5201281' ]

As you can see, the message starts with > since Asterisk is sending the call. You will also see the Message type as  SETUP indicating the start of the call and the channel of the span being used  Ext: 1  Channel: 5 , the caller ID in the Calling Number (2564286000) and the number dialed in The called number (5201281). 

 
Another important thing when debugging (especially on a live system) is the reference number. The line above the Message type has this number which is the unique identifier for the call. In this case its 353. All messages related to this call will have the same reference number for outbound and inbound messages from the telco. Once you find the SETUP and the reference for it, you can track the whole call.
 
After Asterisk sends a SETUP to the telco notifying them that it is sending them a new call, the telco should reply back with a CALL PROCEEDING. Some switches will first reply back with a SETUP ACKNOWLEDGE message before CALL PROCEEDING. It looks like this:
 
< Call Ref: len= 2 (reference 353/0x161) (Terminator)
< Message type: CALL PROCEEDING (2)
< [18 04 e9 80 83 85]
< Channel ID (len= 6) [ Ext: 1  IntID: Explicit, PRI Spare: 0, Exclusive Dchan: 0
<                        ChanSel: Reserved
<                       Ext: 1  DS1 Identifier: 0
<                       Ext: 1  Coding: 0   Number Specified   Channel Type: 3
<                       Ext: 1  Channel: 5 ]
 
For this message the reference number is 353, and this message is from the telco as indicated by <. This basically means that the telco is processing the call.
 
< Call Ref: len= 2 (reference 353/0x161) (Terminator)
< Message type: ALERTING (1)
< [1e 02 84 88]
< Progress Indicator (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location: Public network serving the remote user (4)
<                               Ext: 1  Progress Description: Inband information or appropriate pattern now available. (8) ]

The above message is also from the telco. This ALERTING message tells Asterisk that the phone it called is ringing.
 
< Call Ref: len= 2 (reference 353/0x161) (Terminator)
< Message type: CONNECT (7)
 
This message from the telco tells Asterisk that the call was answered by the phone we dialed.
 
> Protocol Discriminator: Q.931 (8)  len=5
> Call Ref: len= 2 (reference 353/0x161) (Originator)
> Message type: CONNECT ACKNOWLEDGE (15)
 
Asterisk is telling the telco that we are acknowledging the CONNECT and bringing the call fully up. After this point, the call is up and passing audio.
 
< Protocol Discriminator: Q.931 (8)  len=9
< Call Ref: len= 2 (reference 353/0x161) (Terminator)
< Message type: DISCONNECT (69)
< [08 02 82 90]
< Cause (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location: Public network serving the local user (2)
<                  Ext: 1  Cause: Normal Clearing (16), class = Normal Event (1) ]

Disconnects marks the end of the call.  This message came from the telco and states a reason in the Cause field. On this message it was a normal hangup or cause 16.  If the call was disconnected because of an error, the reason will be displayed in this Cause field. Many times it's not clear as to what error happened though, and some research may be required. For more information please see ISDN Disconnect cause code
 
> Protocol Discriminator: Q.931 (8)  len=9
> Call Ref: len= 2 (reference 353/0x161) (Originator)
> Message type: RELEASE (77)
> [08 02 81 90]
> Cause (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location: Private network serving the local user (1)
>                  Ext: 1  Cause: Normal Clearing (16), class = Normal Event (1) ]
 
Asterisk sends this message back to the telco telling that the channel is being release 
 
< Protocol Discriminator: Q.931 (8)  len=5
< Call Ref: len= 2 (reference 353/0x161) (Terminator)
< Message type: RELEASE COMPLETE (90)

Telco completes the handshake informing that it has released the channel. 

Q53  ISDN Disconnect cause codes

Disconnect cause codes

HexDecimalCause
0x11Unallocated or unassigned number
0x22No route to specified transit network (Transit Network Identity)
0x33No route to destination
0x44Send special information tone
0x55Misdialled trunk prefix
0x66Channel unacceptable
0x77Call awarded and being delivered in an established channel
0x88Prefix 0 dialed but not allowed
0x99Prefix 1 dialed but not allowed
0xA10Prefix 1 not dialed but required
0xB11More digits received than allowed, call is proceeding
0x1016Normal call clearing
0x1117User busy
0x1218No user responding
0x1319T.301 expired: - User Alerted, No answer from user
0x1521Call rejected
0x1622Number changed to number in diagnostic field.
0x1723Reverse charging rejected
0x1824Call suspended
0x1925Call resumed
0x1A26Non-selected user clearing
0x1B27Destination out of order
0x1C28Invalid number format or incomplete address
0x1D29EKTS facility rejected by network
0x1E30Response to STATUS ENQUIRY
0x1F31Normal, unspecified
0x2133Circuit out of order
0x2234No circuit/channel available
0x2335Destination unattainable
0x2436Out of order
0x2537Degraded service
0x2638Network out of order
0x2739Transit delay range cannot be achieved
0x2840Throughput range cannot be achieved
0x2941Temporary failure
0x2A42Switching equipment congestion
0x2B43Access information discarded
0x2C44Requested circuit channel not available
0x2D45Preempted
0x2E46Precedence call blocked
0x2F47Resource unavailable, unspecified
0x3149Quality of service unavailable
0x3250Requested facility not subscribed
0x3351Reverse charging not allowed
0x3452Outgoing calls barred
0x3553Outgoing calls barred within CUG
0x3654Incoming calls barred
0x3755Incoming calls barred within CUG
0x3856Call waiting not subscribed
0x3957Bearer capability not authorized
0x3A58Bearer capability not presently available
0x3F63Service or option not available, unspecified
0x4165Bearer service not implemented
0x4266Channel type not implemented
0x4367Transit network selection not implemented
0x4468Message not implemented
0x4569Requested facility not implemented
0x4670Only restricted digital information bearer capability is available
0x4F79Service or option not implemented, unspecified
0x5181Invalid call reference value
0x5282Identified channel does not exist
0x5383A suspended call exists, but this call identity does not
0x5484Call identity in use
0x5585No call suspended
0x5686Call having the requested call identity has been cleared
0x5787Called user not member of CUG
0x5888Incompatible destination
0x5989Non-existent abbreviated address entry
0x5A90Destination address missing, and direct call not subscribed
0x5B91Invalid transit network selection (national use)
0x5C92Invalid facility parameter 93 Mandatory information element is missing
0x5D93Message type non-existent or not implemented
0x5F95Invalid message, unspecified
0x6096Mandatory information element is missing
0x6197Message type non-existent or not implemented
0x6298Message not compatible with call state or message type non-existent or not implemented
0x6399Information element nonexistent or not implemented
0x64100Invalid information element contents
0x65101Message not compatible with call state
0x66102Recovery on timer expiry
0x67103Parameter non-existent or not implemented - passed on
0x6F111Protocol error, unspecified
0x7F127Internetworking, unspecified
0x80+128 or

higher

Proprietary diagnostic code (not necessarily bad). Typically used to pass proprietary control or maintenance messages between multiplexers.