How to configure digium E1/ISDN/PRI cards in asterisk

    Step by step guide to configure the Digium E1/ISDN/PRI Telephony cards in asterisk based dialer like Freepbx, Vicidial, Goautodial, Elastix, Issabel. This article supports Digium cards TE131/TE133, TE235, TE435 and TE820.

how to configure digium cards in asterisk

What is Digium Digital cards?

    Digium/Sangoma digital interface cards support 24/48/96 (T1 / J1) or 30/60/120 (E1) connections to PSTN trunks over two spans (digital circuits). Built exclusively for use with Asterisk and Asterisk-based communications systems, the dual span cards provide the best value in digital connectivity.

    Digium TE13X,TE235 and TE435 works with Any version of Asterisk and need Dahdi 2.9 or above versions.

If your using Old dahdi version better reinstall the latest dahdi version

    Unlike Digium’s old cards these new cards wont have Jumper to interchange between E1 and T1.

The E1/T1 to be done via software which will be covered in this topic

Assume you have installed Lastest dahdi driver ie: dahdi 2.9 or above.
To check the dahdi version type dahdi_cfg –v in linux console.
Make sure dahid linux and dahdi tool should be in same version.

Digium TE235/TE435 Configuration

    Below are the steps to configure the digum cards, as part of this tutorial we are using the Digium TE235 or TE435 cars configuration steps.

Step 1: Enabling The E1 mode

    Before configuring the card make sure your card is detected by linux by running the below command

lspci -v

the above command should list the digium hardware inserted to the server, if not detected try different slot in the server.

Next we need to decide whether you need to configure the card as E1 or T1 mode, if you are configuring the card in INDIA then its E1 , for US its T1 for japan it J1

edit the file dahdi.conf file

vi /etc/modprobe.d/dahdi.conf
go to the last line and paste the below line if you are using TE235 or TE435 cards
options wcte43x default_linemode=e1

For the Digium cards TE13X ie TE131,TE132,TE133,TE134 set the below options

 options wcte13x default_linemode=e1

For the Digium cards TE820 set the below options 

 options wct4xxp default_linemode=e1

save and exit (:wq)

Note: For T1 mode replace default_linemode=e1 to default_linemode=t1

Step 2: Removing the drives from the blacklist

By default in asterisk the dahdi drivers are blacklisted to avoid loading all the drivers in server, so we need to remove those blacklist to load the respective drivers.

Edit the dahdi.blacklist.conf 
vi /etc/modprobe.d/dahdi.blacklist.conf
put # in front of wcte43x



save and exit

Step 3 : configuring the digium card with autogen script

By default dahdi software installs the dahdi auto config generator called dahdi_genconf, which auto loads the driver and creates the dahdi config files.

run the below commands for TE235 or TE435 cards
modprobe wcte43x default_linemode=e1
dahdi_genconf -v
dahdi_cfg -v 

run the below commands for TE13x cards

modprobe wcte13xp default_linemode=e1
dahdi_genconf -v
dahdi_cfg -v 
the above command should display the configured channels.

step 4 : Adding the dahdi-channels file to asterisk

The auto generated files are saved in a file named a dahdi-channels.conf under asterisk folder, the configuration should be inherited in chan_dahdi.conf file.
vi /etc/asterisk/chan_dahdi.conf
go to the last line and add the below line
#include dahdi-channels.conf
save and submit

step 5 : reloading the dahdi drivers

run the below command in linux shell to load the dahdi drivers in asterisk to take effect the configurations.

asterisk -rx "module unload"
asterisk -rx "module load"

step 6 : check the status of PRI

finally we can check the status of PRI line from asterisk cli run the below commands
asterisk -vvvvvvvvr
dahdi show status 
pri show spans

if status shows red  then you need to check with your pri cable
if it is crc  issue  enable or disable the crc in the below location

vi /etc/dahdi/systems.conf  
remove or add  crc4.

step 7 : dialplan to dial via PRI

Finally we need to write the asteirsk dialplan to dial out and receive call from digium cards.

DAHDI is the channel variable to be used to dial via pri
below is the sample example dialplan
exten => _9X.,1,Dial(DAHDI/G0/${EXTEN:1})
exten => _9X.,2,Hangup()
Note: ****
dialplans for those using vicidial goautodial
exten => _9X.,1,AGI(agi://
exten => _9X.,2,Dial(DAHDI/g0/${EXTEN:1},,Tto)
exten => _9X.,3,Hangup

Dialplan for those using Freepbx,elastix, Piaf ,asterisknow
In GUI  create dahdi trunk with channel group as  g0
and create  outbound route by selecting the above created trunk.


    hope the article is helpful , for troubleshooting the PRI line use the command "pri show spans" and "dahdi show status", For professional support reach me on skype or telegram : striker24x7

  • Ajit Kumar
    Ajit Kumar April 4, 2022 at 11:18 AM

    HOW TO Configuring Digium TE235 and TE435 cards with asterisk , vicidial

Add Comment
comment url