T1/E1 Tapping Solution
-> PDF Tutorial
| NOTE: The software modifications to allow the tapping system to work with Asterisk or FreeSWITCH do NOT support overlap dialing. If you are designing your own application it can be made to work with overlap dialing. This is a software limitation and not a hardware limitation. |
Introduction
As requirements for security, customer service and legal responsibilities have increased, it has become important to be able to monitor and record telephone conversations.
Sangoma's T1/E1 tapping solution is a high performance, robust and inexpensive toolkit that gives you complete access to the T1/E1 voice and signaling interfaces. Based on the popular A102, A104 and A108 AFT cards, the system supports the tapping of one, two and four T1/E1 lines per card respectively.
A convenient Tap Connection Adapter is available, which allows the data transport line to be hard wired with strain relief. The tapping connections are then simply connected to the RJ45 connectors provided.
Architecture:
The Sangoma Line Tapping Solution is comprised physically of an A102 (dual port) A104 (quad port) or A108 (octal port) T1/E1 card, standard cabling, and a PN 633 Tap Connection Adapter. The lines to be tapped are hard wired into the Tap Connection Adapter. Straight cables are connected between the Tap Connection Adapter and a pair of ports on the T1/E1 card, allowing both sides of the line to be monitored simultaneously.
The system can be used in both standard impedance and high impedance modes, high impedance being used to ensure that no accidental short of the monitoring lines will affect the flow of T1/E1 traffic.
A line can be tapped 5 times using a filtered tap without negative affects.
INSTALLATION
Physical installation of the Sangoma Tap is quite simple:
- Open the case of the Sangoma Tap; a screw driver will aid you in gently opening the tap.
- Connect the existing T1/E1 line to the "To NET" connector.
- Connect one end of a standard "straight" T1/E1 cable to the "To CPE" port of the tap and other end to the normal termination point of the T1/E1.
- Replace the cover of the Sangoma Tap removed in step 1.
- Confirm that all cables are installed correctly by checking that the physical layer (T1/E1) is up and active on both sides of the line.
- Connect a "straight" cable to the both "TX NET" and "TX CPE" ports of the tap and run these cables to the Sangoma card that will be used to monitor the tapped line.
CONFIGURATION
Linux:
- Install the latest stable Wanpipe drivers with Option 1 on to the system that will be used to monitor the tapped line. You can find the latest stable drivers here.
- Once the drivers are installed, use the command "$ wancfg" to create configuration files.
- Select "Create a New Configuration File" to create a new file or "Edit an existing Configuration File" to edit and existing file.
- Let the driver detect the cards in the system by selecting "Select from detected cards list".
- Select the card and port number that you wish to use for tapping.
- Select the "Physical Medium" that you plan to tap, either E1 or T1.
- Next enter the "Advanced Physical Medium Configuration" menu.
- When you selected the Physical Medium the line coding and line framing was set to defaults for that medium, check to make sure that "Line Decoding" and "Framing" are set to the correct values for the line you are planning to tap.
- Next, still under "Advanced Physical Medium Configuration" menu change "High Impedance" to "yes" and "Rx Sensetivity Level" to "12db".
- Select the "back" button twice or until you are at the "Wanpipe Configuration" menu.
- Select the "Protocol" menu, and select the "TDM Voice API" protocol (For Asterisk setups this must be TDM Voice only, not TDM Voice API).
- Again, select the "back" until you are at the "Wanpipe Configuration" menu.
- Now select the "Interface Setup" menu, and select the Interface you want to setup (depends on the number of groups you configured earlier).
- In the "Interface Configuration" menu set the "TDM Voice Span" value to the first available span number (by default this value is 0 but the first span should start at 1).
- You are now done configuring the port, select "bacK" or "exit" until you are out of the Wancfg utility.
- Test the configuration file you have created by running "wanrouter start wanpipeX" were X is the port number (make sure to have a line connected).
If you have any problems please contact Sangoma tech support at "techdesk@sangoma.com"- Repeat for each port that will be used to tap.
Sample T1 Configuration File
Sample E1 Configuration File
#================================================
# WANPIPE1 Configuration File
#================================================
#
# Date: XXXXXXX
#
# Note: This file was generated automatically
# by /usr/sbin/wancfg program.
#
# If you want to edit this file, it is
# recommended that you use wancfg program
# to do so.
#================================================
# Sangoma Technologies Inc.
#================================================
[devices]
wanpipe1 = WAN_AFT_TE1, Comment
[interfaces]
w1g1 = wanpipe1, , TDM_VOICE_API, Comment
[wanpipe1]
CARD_TYPE = AFT
S514CPU = A
CommPort = PRI
AUTO_PCISLOT = YES
PCISLOT = 0
PCIBUS = 0
FE_MEDIA = T1
FE_LCODE = B8ZS
FE_FRAME = ESF
FE_LINE = 1
TE_CLOCK = NORMAL
TE_REF_CLOCK = 0
TE_HIGHIMPEDANCE = YES
TE_RX_SLEVEL = 225
LBO = 0DB
FE_TXTRISTATE = NO
MTU = 1500
UDPPORT = 9000
TTL = 255
IGNORE_FRONT_END = NO
TDMV_HW_DTMF = NO
TDMV_DCHAN = 24
[w1g1]
ACTIVE_CH = ALL
TDMV_HWEC = NO
#================================================
# WANPIPE1 Configuration File
#================================================
#
# Date: XXXXX
#
# Note: This file was generated automatically
# by /usr/sbin/wancfg program.
#
# If you want to edit this file, it is
# recommended that you use wancfg program
# to do so.
#================================================
# Sangoma Technologies Inc.
#================================================
[devices]
wanpipe1 = WAN_AFT_TE1, Comment
[interfaces]
w1g1 = wanpipe1, , TDM_VOICE_API, Comment
[wanpipe1]
CARD_TYPE = AFT
S514CPU = A
CommPort = PRI
AUTO_PCISLOT = YES
PCISLOT = 0
PCIBUS = 0
FE_MEDIA = E1
FE_LCODE = HDB3
FE_FRAME = CRC4
FE_LINE = 1
TE_CLOCK = NORMAL
TE_REF_CLOCK = 0
TE_HIGHIMPEDANCE = YES
TE_RX_SLEVEL = 225
LBO = 120OH
TE_SIG_MODE = CCS
FE_TXTRISTATE = NO
MTU = 1500
UDPPORT = 9000
TTL = 255
IGNORE_FRONT_END = NO
TDMV_HW_DTMF = NO
TDMV_DCHAN = 16
[w1g1]
ACTIVE_CH = ALL
TDMV_HWEC = NO
Windows:
- Install the latest Wanpipe drivers on the system that will be used to tap, you can find the latest stable drivers and install instructions here.
- Once the drivers are installed, go to the "Device Manager" to begin configuration.
- Right click the port you wish to configure and select "Properties", then switch over to the "Line Configuration Tab"
- Change the "Line Media", "Line Coding", and "Line Framing" to the correct values for your line.
- Next set the "High Impedance" option to "ON" and increase the "Rx Sensitivity" to the max (12db). Below is a sample screen:
- Next switch to the "T1/E1 Groups of Channels" tab and configure the channel grouping to your liking. Remember to use TDM Voice API and the MTU has to be a multiple of the number of channels in the group.
Asterisk Tapping
It is possible to use Asterisk to record PRI calls using Sangoma's T1/E1 tapping solution. Asterisk will see the tapped spans and will passively detect when a new call is being placed in the PRI link and automatically create a new channel and place it in the dial plan just like a regular call, however, being that the call comes in in tapped lines, all audio and signaling transmitted will be dropped by the driver. This is usually not an issue, you can still use applications like MixMonitor(), Monitor(), Dial(), Record() to save the call audio or send the audio of the call to any extension you want, This functionality is still being developed by Sangoma, which means changes in configuration and usage may still take place while the development continues towards inclusion of this feature natively in Asterisk. By the time being, this feature requires libpri and Asterisk 1.6 from the following branches:
http://svn.digium.com/svn/libpri/team/moy/tap-1.4/
http://svn.digium.com/svn/asterisk/team/moy/dahdi-tap-1.6.2/
Install DAHDI, then Wanpipe drivers and finally from the mentioned branches install libpri and Asterisk as you would normally do. In order to use the tapping spans all you have to do is configure the wanpipe TDM spans as you usually would do for a PRI link, but, in the chan_dahdi.conf file the channels for each span must be configured with the special "passive=yes" parameter.
For example, this is a configuration for an A102 in T1 mode:
; chan_dahdi.conf
passive=yes ; if you are mixing passive with not passive channels set passive=no when starting a non-passive span. Read the important limitations regarding span numbering at the bottom.
signalling=pri_cpe ; You can put pri_net or pri_cpe here, both work when the span is in passive mode.
channel =>1-23
channel =>25-47
Note that passive PRI spans will be shown as "Down", even when the spans are correctly monitoring the line. Just make sure that the line is connected using "wanrouter status" at the Linux CLI.
Once this is done, Asterisk should identify when a new call is placed in the tapped PRI link. Since this feature is still in development I strongly suggest to enable the DEBUG logging in /etc/asterisk/logger.conf while you prepare the link. Once the tapping link is working you can remove the debug settings.
To test your monitor place a call in your tapped PRI link. When a call is placed you should see something like this in the log (or the Asterisk CLI if configured to receive DEBUG messages)
*CLI> [Sep 25 23:57:30] DEBUG[19300]: chan_dahdi.c:12454 handle_pri_passive_event: Ring on channel 1 of span 2 with callref 108
[Sep 25 23:57:30] DEBUG[19299]: chan_dahdi.c:12474 handle_pri_passive_event: Proceed on channel 1 of span 1
[Sep 25 23:57:30] DEBUG[19299]: chan_dahdi.c:12627 handle_pri_passive_event: Created conference 1022 with fd 73 between dahdi chans 1 and 25 for ast channel DAHDI/1-1
-- Executing [112233445566@from-pstn:1] Goto("DAHDI/1-1", "s,1") in new stack
-- Goto (from-pstn,s,1)
-- Executing [s@from-pstn:1] Answer("DAHDI/1-1", "") in new stack
[Sep 25 23:57:30] DEBUG[19299]: chan_dahdi.c:12749 pri_passive_dchannel: pri_event got EINT, continuing ...
[Sep 25 23:57:30] DEBUG[19299]: chan_dahdi.c:12642 handle_pri_passive_event: Answer on channel 1 of span 1
-- Executing [s@from-pstn:2] Record("DAHDI/1-1", "advanced-recording%d:wav") in new stack
-- <DAHDI/1-1> Playing 'beep.gsm' (language 'en')
In this case extensions.conf was configured to run the Record() application in wav format, but you can do whatever you want with the call, just keep in mind that applications writing audio to the channel simply won't work because all the audio transmitted is dropped by the tapping link.
On hangup you should see:
*CLI> [Sep 26 00:00:14] DEBUG[19299]: chan_dahdi.c:12670 handle_pri_passive_event: Hangup on channel 1 of span 1
== Spawn extension (from-pstn, s, 2) exited non-zero on 'DAHDI/1-1'
-- Hungup 'DAHDI/1-1'
[Sep 26 00:00:14] DEBUG[19299]: chan_dahdi.c:12749 pri_passive_dchannel: pri_event got EINT, continuing ...
[Sep 26 00:00:14] DEBUG[19300]: chan_dahdi.c:12708 handle_pri_passive_event: Hangup ack on channel 1 of span 2
Limitations:
- No NFAS support.
- Monitoring spans must be contiguous and start at an even number (0 considered even, 2, 4, 6 etc).
TDM API
http://wiki.sangoma.com/wanpipe-linux-tdm-voice-api
FAQ
- How many times can I tap a line without any negative affects?
-testing in Sangoma labs has shown that you can safely tap a line 5 times using a filtered tap without any negative affects on the main link.









