MFCR2 Support on FreePBX - Brazil

Hello Everyone,

I am running out of options, and hopefully someone can please help me out.

I need help getting MFCR2 (R2D) up running in our Rio de Janeiro, Brazil office. Due to heavy cuts, we had to downgrade from ISDN to R2D. However, after clearly every possible attempt to get it to work, on Asterisk 10.7.1 with OpenR2, with dahdi-linux.x86_64 and libpri.x86_64 1.4.12-1_centos5 , running on CentOS 5.5 64bit, and Digium WTE121 card. I cannot get it to work.

I have been referred by someone at an Asterisk forum to try AsteriskNOW.

Does or does not FreePBX support MFCR2, and if it does, how in the world does one get it to work? This protocol is supported in quite a few South American countries and for economic reasons, it is affordable.

If anyone can assist, or clear things up for me, I am very grateful. Like, I said, I have run out of options, and our Telco, Mundivox, says the problem is on our end. I cannot get an engineer to literally tell me what is wrong!

Thank You.


You could try contacting Digium directly for support if you have not already… a quick search shows me that there is a configuration guide for Sangoma Gear…

and an active mailing list at

The distro has support. Note we are in the US so it probably hasn’t been thoroughly tested:

Loaded => (DAHDI Telephony Driver w/PRI & SS7 & MFC/R2 & WAT)

But MFCR2 is not selectable in DAHDI Config module, right?

Hi Natalia!

Are you trying to configure Dahdi channels inside Freepbx? If so… Dahdi modules doesnt know CAS type.

By this reason, when you start Asterisk, it doesnt bring “mfcr2” commands.

At this moment, I suggest you disable in Asterisk Settings (Freepbx) the Dahdi module, and configure your channels mannualy.

Boa sorte! :smile:

Precisando de ajuda, pergunte! Tenho varios IPBX em R2.
Sorry people, I am brazilian too :smile:

Love you Freepbx! Doing great work!

Hi Denilson,

I am also from Brazil and new to Freepbx. After googling for 2 days it seems that you are the guy for R2 digital signaling.
Could you share with me a walk through on how to enable R2 in the latest Freepbx 13?

I can later organize and share with the community as it seems that you just can find this piece of information well structured in any place.

My setup:

  • Freepbx 13 installed
  • Digium card TE235 (with HW echo cancelling)
  • Embratel E1 R2 digital

Many thanks,
Um abraço,

You need to manually configure the chan_dahdi.conf, as mentioned above:


;Configuracao para MFC/R2
channel =>1-15,17-31

Qualquer coisa meu skype é: jersonjunior

First of all I would like to thank Jerson Júnior for his help sharing his config and making himself available via Skype.

As promised I am documenting here some lessons learned and I will also try to consolidate information from various places.

My setup:

  • Country: Brazil
  • Telco: Embratel
  • Link type: E1 R2

Implementation scenario:
Embratel E1 <-> Freepbx (Digium TE235 -2 span E1) <-> Legacy PBX (Siemens Hipath 1150)

IMPORTANT: First lesson learned and that made me waste about a week banging my head against the wall is that Digium cards do not work with VMware ESX 5.5 using the PCI pass-through feature (hopefully in the future they will).
Things became much clearer and easier to debug when setting up in a bare metal environment. So if you’re planning on installing a digital telephony card in ESX I suggest you previously do all the lab tests on bare metal and only then try to replicate in a VM.

Links to relevant information used in the setup.

!!!Before anything!!! MFCR2 is not available as a configuration option within FreePBX GUI. So you will have to manually edit the config files. With that said, you should not use CONNECTIVITY -> DAHDI CONFIGURATION in FreePBX. If you inadvertently do It will even prompt you to enable the DAHDI WRITE TO CONFIG and if you accidentally enable this you will have to later disable it under SEETINGS -> ADVANCED SETTINGS because otherwise your config files will be overwritten on every service restart.

0) Config your files
Hardware setup -> /etc/dahdi/system.conf
Channels setup -> /etc/dahdi/chan_dahdi.conf (and all chan_dahdi_*.conf)
You may also disable modules not used by your card in /etc/dahdi/modules.

1) Check if HARDWARE came up OK.

Ensure your DAHDI interface is coming up OK. To see errors try restarting the service from SSH console (service dahdi restart).
cat /proc/dahdi/1 (should show SPAN 1 channels)
For eg.:
Span 1: WCTE2/0/1 “WCTE23X (PCI) Card 0 Span 1” HDB3 ClockSource

           1 WCTE2/0/1/1 CAS (In use) (EC: VPMOCT064 - INACTIVE)
           2 WCTE2/0/1/2 CAS (In use) (EC: VPMOCT064 - INACTIVE)
           3 WCTE2/0/1/3 CAS (In use) (EC: VPMOCT064 - INACTIVE)
           4 WCTE2/0/1/4 CAS (In use) (EC: VPMOCT064 - INACTIVE)
           5 WCTE2/0/1/5 CAS (In use) (EC: VPMOCT064 - INACTIVE)
           6 WCTE2/0/1/6 CAS (In use) (EC: VPMOCT064 - INACTIVE)

dahdi_cfg -vvv will give even more info.

[[email protected] asterisk]# dahdi_cfg -vvv
DAHDI Tools Version - 2.11.1

DAHDI Version: 2.11.1
Echo Canceller(s): HWEC

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: none) (Slaves: 01)
Channel 02: CAS / User (Default) (Echo Canceler: none) (Slaves: 02)
Channel 03: CAS / User (Default) (Echo Canceler: none) (Slaves: 03)
Channel 04: CAS / User (Default) (Echo Canceler: none) (Slaves: 04)
Channel 05: CAS / User (Default) (Echo Canceler: none) (Slaves: 05)
Channel 06: CAS / User (Default) (Echo Canceler: none) (Slaves: 06)

Check for ALARMS running “dahdi_tool”, spans should state OK

2) Check DAHDI channels state.
Connect to ASTERISK CLI by "asterisk -r"
View channels “dadhi show channels”

If everything is looking good then basically you just need to setup call routing within FreePBX. Otherwise you will need more tweaking with the config files.

3) Setup Trunks in FreePBX
4) Setup an OUTBOUND ROUTE in FreePBX
5) Setup an INBOUND ROUTE in FreePBX


  • use ASTERISK CLI enable debugging “core set debug 1” (1 or more)
  • /var/log/asterisk/mfcr2 (enable logging in chan_dahdi.conf)

Good luck!!!