Quick Configuration

The following is meant to be step by step guide to aid in configuring an asterisk system for use with the OpenR2 library and Sangoma PRI cards.  If you have not already installed the OpenR2 library then please do that now.

Wanpipe Configuration

After wanpipe is installed you can configure asterisk to use the card using our configuration script.  Once in this configuration script and after having selected an E1 configuration make sure to select the E&M Wink signalling type.

wancfg_dahdi

...

Select signalling type for AFT-A108 on port 1 [slot:4 bus:5 span:1] 1. Zaptel/Dahdi - PRI CPE 2. Zaptel/Dahdi - PRI NET 3. Zaptel/Dahdi - E & M 4. Zaptel/Dahdi - E & M Wink 5. Zaptel/Dahdi - FXS - Loop Start 6. Zaptel/Dahdi - FXS - Ground Start 7. Zaptel/Dahdi - FXS - Kewl Start 8. Zaptel/Dahdi - FX0 - Loop Start 9. Zaptel/Dahdi - FX0 - Ground Start 10. Zaptel/Dahdi - FX0 - Kewl Start 11. Sangoma SMG/sangoma_prid- PRI CPE 12. Sangoma SMG/sangoma_prid- PRI NET [1-12]:4 ....
 

 

This will create a wanpipe.conf file such as this: wanpipe1.conf


 

Asterisk Configuration

The chan_dahdi module config file will need to be manually re-written.  Below is an example template for a Sangoma A101 card.  
Please copy and paste this into your /etc/asterisk/chan_dahdi.conf file and remove the portion generated by the E&M wink configuration.

#Sangoma A108 port 1 [slot:4 bus:5 span:1] <wanpipe1>
group=0
context=from-pstn
signalling=mfcr2
mfcr2_variant=mx
mfcr2_get_ani_first=no
mfcr2_max_ani=10
mfcr2_max_dnis=4
mfcr2_category=national_subscriber
mfcr2_call_files=yes
mfcr2_logdir=span1
mfcr2_logging=all
mfcr2_mfback_timeout=-1
mfcr2_metering_pulse_timeout=-1
channel => 1-15,17-31

NOTE*: this example is for the Mexico variant
Here is a copy of chan_dahdi.conf but with an additional entry for use with an A102 Sangoma card: chan_dahdi.conf

 

Also copy and paste the following into your /etc/dahdi/system.conf and remove the part from the E&M wink configuration.

Here is a copy of /etc/dahdi/system.conf but with an additional entry for use with an A102 Sangoma card: system.conf
Note: if you experience alarms on the link comment out the dchan=16 line

 


 

Testing your config files

Now you can start wanrouter and dahdi:

Starting WAN Router...
Loading WAN drivers: wanpipe done.
Starting up device: wanpipe1
--> Loading ec image OCT6116-256S.ima...
Starting up device: wanpipe2
Configuring interfaces: w1g1
done.

DAHDI Tools Version - 2.6.1

DAHDI Version: 2.6.1
Echo Canceller(s): HWEC
Configuration
======================

SPAN 1: CAS/HDB3 Build-out: 0 db (CSU)/0-133 feet (DSX-1)
SPAN 2: CAS/HDB3 Build-out: 0 db (CSU)/0-133 feet (DSX-1)

Channel map:

Channel 01: CAS / User (Default) (Echo Canceler: mg2) (Slaves: 01)
Channel 02: CAS / User (Default) (Echo Canceler: mg2) (Slaves: 02)
Channel 03: CAS / User (Default) (Echo Canceler: mg2) (Slaves: 03)
Channel 04: CAS / User (Default) (Echo Canceler: mg2) (Slaves: 04)
Channel 05: CAS / User (Default) (Echo Canceler: mg2) (Slaves: 05)
Channel 06: CAS / User (Default) (Echo Canceler: mg2) (Slaves: 06)
Channel 07: CAS / User (Default) (Echo Canceler: mg2) (Slaves: 07)

...

Changing idle bits of channel 20 from 0 to 13
Setting echocan for channel 20 to mg2
Changing signalling on channel 21 from Unused to CAS / User
Changing idle bits of channel 21 from 0 to 13
Setting echocan for channel 21 to mg2
Changing signalling on channel 22 from Unused to CAS / User
Changing idle bits of channel 22 from 0 to 13
Setting echocan for channel 22 to mg2
Changing signalling on channel 23 from Unused to CAS / User
Changing idle bits of channel 23 from 0 to 13
Setting echocan for channel 23 to mg2
Changing signalling on channel 24 from Unused to CAS / User

NOTE*: If you see any errors in the above output it means you have incorrectly composed your Dahdi configuration files.  
Double check that your files look similar to the examples above and then try restarting Dahdi again.

 

Enter the Asterisk CLI and run some commands to double check that the library is properly initialized via the chan_dahdi.so module.  
The following command will list all the OpenR2 configured channels on your system.

You can also check your OpenR2 library version from within the Asterisk CLI.

 

One final check might be to list the library signalling variants.

 

If you see the outputs shown above then you can be very confident that the OpenR2 library has been properly installed and linked into Asterisk.  
You can now move on to more advanced configuration options such as choosing your R2 signalling variant and log settings.

 

Return to Documentation Home I Return to Sangoma Support