How to: Perform a Pattern Loopback Test
*** Updated to be for current servers only (legacy / FCS). Removed references to zap / digium / etc. G.N. 2019-08-06
To verify that a T1 PCI card is working properly, a loopback test can be run using a hardware loopback plug. If you need to build a loopback plug, pin 1 connects to pin 4 and pin 2 connects to pin 5. Pins are numbered left to right when the hook is underneath, and the conductors are furthest away from you. Connect the loopback plug, and run the test as described below.
Loopback plug diagram - please see:
T1 Crossover Cable
Make sure that the T1 carrier's cable is connected to the back of the Superlooper so that the carrier sees a loop back and a green on the T1. This will let them know not to disable the line.
Edit Zaptel
Next, edit the /etc/zaptel.conf file. Comment out the span information using the ‘#’ character. Enter these lines:
span=1,1,0,esf,b8zs
clear=1
clear=2
clear=3
clear=4
clear=5
clear=6
clear=7
clear=8
clear=9
clear=10
clear=11
clear=12
clear=13
clear=14
clear=15
clear=16
clear=17
clear=18
clear=19
clear=20
clear=21
clear=22
clear=23
clear=24
You must type 'clear=X' for every channel (1-24).
Next, stop asterisk and FONmon.
Hardware-specific Information
Sangoma
Backup and modify the wanpipeX.conf file
MASTER timing
Configure the port on the Sangoma card for Master clock
vi /etc/wanpipe/wanpipe*.conf
TE_CLOCK = MASTER
No Hardware HDLC
vi /etc/wanpipe/wanpipe*.conf
TDMV_DCHAN = 0
No Hardware Echo Cancellation
vi /etc/wanpipe/wanpipe*.conf
TDMV_HWEC = NO
Start the test
Sangoma
Stop asterisk and start the driver by itself
touch /etc/asterisk/NO_FONMON # and don't forget to remove this file after the test is done!!
/etc/init.d/asterisk/stop OR service asterisk stop
** check to ensure wanpipe / wanrouter is fully stopped **
lsmod | egrep wanpipe
Ensure you do not see any of these:
wanpipe 1072267 194wanrouter 44347 9 wanec,af_wanpipe,wanpipesdladrv 235082 4 wanec,af_wanpipe,wanpipe,wanrouterdahdi 193994 415 wanpipe
wanrouter start
dadhi_cfg –vvvvvv
Check your work
Verify that a green light shows on the card when the loopback plug is connected. Run ‘dahdi_tool’ and verify that the T1 is in “OK” state.
Confirm the Test Will Work
The command can be run from any directory. Run the test for 30 seconds by specifying a last argument of 30
[root@pbxtra0000 ~]$ nice -n -11 patlooptest /dev/dahdi/1 30
Going for it...
Watch for the message "going for it". If you do not see the message, the test is not working. If you do see it, only errors will be displayed after that. The prompt will return when the test is complete. If you do see errors, RMA the card.
NOTE!!! Sometimes using the 'nice' command can hose up the patloop test. If you see errors with 'nice', make sure you try once WITHOUT 'nice' just to see if there is any change.
Run the Test
You'll want to edit zaptel.conf and wanpipe1.conf to restore the original config. (This will allow the customer to reboot the server in the morning and begin using the system, provided that the card is fine.)
script -c "nice -n -11 patlooptest /dev/dahdi/1 14400" loop.test
When you get back on the server in the morning, or later that evening, look through loop.test to see if there are errors during the test.