How to configure a Digium E1 PRI card
Digium Digital Series cards have a variety of configuration options. This KB artcile provides configurations for T1 ISDN PRI. These sample configurations are provided to assist you in familiarizing yourself with the flexibility of editing the configuration files to meet your specific needs. Please make sure to confirm with your Telco or System Administaror the proper line configuration that the needs to match.Â
Configuring E1 (DAHDI)
Set the driver to E1 mode, Open /etc/modprobe.d/dahdi.conf and add default_linemode=e1 paramtherÂ
If you have single span cardÂ
options wcte13xp default_linemode=e1
options wcte12xp default_linemode=e1
Â
Â
If you have a dual/Quad/Octal span card:Â
options wct4xxp default_linemode=e1
Open the system.conf file from the /etc/dahdi directory.
Specify the two letter country code for your loadzone and defaultzone. This will preload tone zone data and specify a default tone zone for your interfaces.
The following is a typical setup for a telco in the UK:
loadzone = uk
defaultzone = uk
Â
Configure the SPAN Map.
For each T1/E1 you are using, you will need to define a span. The SPAN map includes defining the SPAN number, timing, line build out, framing, and coding. Configuration details for each of these items is in this section.
span => <Number>,<Timing>,<Line Build Out>,<Framing>,<Coding>[,Yellow]Â
Â
The following is a typical setup for a telco in the EU:
span=1,1,0,ccs,hdb3,crc4
Â
Specify the channel definitions.Â
The format is:Â <device> = <channel list>
Â
The following is a typical setup for a T1 PRI in the US:
bchan = 1-23
dchan = 24
Specify the echo canceller to be used for each channel.Â
The format is:Â echocanceller = <echocanceller name>,<channel(s)>
Â
DAHDI uses modular echo cancellers that are configured per channel. The echo cancellers are compiled and installed as part of the dahdi linux package. You can specify the echo canceller to be used for each channel. The default behavior is for there to be no echo canceller on any channel. So, it is very important that you specify one in the system.conf file if you do not have hardware echo cancellers and need echo cancellation.
DAHDI example configuration (/etc/dahdi/system.conf)
span=1,1,0,ccs,hdb3,crc4
bchan=1-15,17-31
dchan=16
echocanceller=mg2,1-15,17-31
Â
# Uncomment the following lines if you have a Dual Span card
#span=2,2,0,ccs,hdb3,crc4
#bchan=32-46,48-62
#dchan=47
#echocanceller=mg2,32-46,48-62
Â
# Uncomment the following lines if you have a Quad Span card
#span=3,3,0,ccs,hdb3,crc4
#bchan=63-77,79-93
#dchan=78
#echocanceller=mg2,63-77,79-93
Â
#span=4,4,0,ccs,hdb3,crc4
#bchan=94-108,110-124
#dchan=109
#echocanceller=mg2,94-108,110-124
# Uncomment the following lines if you have a Octal Span card
#span=4,4,0,ccs,hdb3,crc4
#bchan=94-108,110-124
#dchan=109
#echocanceller=mg2,94-108,110-124
Â
#span=5,5,0,ccs,hdb3,crc4
#bchan=125-139,141-155
#dchan=140
#echocanceller=mg2,125-139,141-155
Â
#span=6,6,0,ccs,hdb3,crc4
#bchan=156-170,172-186
#dchan=171
#echocanceller=mg2,156-170,172-186
Â
#span=7,7,0,ccs,hdb3,crc4
#bchan=187-201,203-217
#dchan=202
#echocanceller=mg2,187-201,203-217
Â
#span=8,8,0,ccs,hdb3,crc4
#bchan=218-232,234-248
#dchan=233
#echocanceller=mg2,218-232,234-248
loadzone = ukÂ
defaultzone = uk
Â
Configuring Card Features (Asterisk)
Begin by opening the system.conf file from the /etc/dahdi directory.
Set Echo Cancellation parameters
echocancel = yes
echocancelwhenbridged=no
Select the Signalling Type
signalling = pri_cpe
There are other signaling types that can be used: pri_cpe for CPE side and pri_net for NET side, If you plan to use NET, please make sure to set the proper timing sources in DAHDI, Usually the NET always provide timing
Select the Switchtype
switchtype = euroisdnÂ
Â
Select the DialPlan context in which your incoming calls will be handled (usually From-PSTN)
context = from-pstn
The context is the an specific section on the Asterisk dialplan that calls will be sent for processing,.See extension.conf  in order to determine which context are availableÂ
Configure the channelsÂ
The format is:Â channels => <Number>[-<Number>]
Asterisk Example ConfigurationÂ
group=0
echocancel = yes
echocancelwhenbridged=no
context=from-pstn
switchtype = euroisdn
signalling = pri_cpe
channel => 1-15,17-31
;
; Uncomment the following lines if you have a Dual Span card
;
;channel => 32-46,48-62
;
; Uncomment the following lines if you have a Quad Span card
;
;channel => 63-77,79-93
;channel => 94-108,110-124
; ; Uncomment the following lines if you have a Octal Span card
; ;channel => 125-139,141-155
;channel => 156-170,172-186
;channel => 187-201,203-217
;channel => 218-232,234-248