FreeTDM OpenR2 Installation
If you want to use MFC-R2 signaling with FreeTDM (most likely to use it with FreeSWITCH), follow this steps:
1. You need first to download openr2 svn trunk.
2. Install the library using CMake.
3. Proceed to install the Wanpipe drivers (use the latest drivers found at http://wiki.sangoma.com/) or if you have a Digium board install DAHDI (see point 5 for clarification)
4. In other directory proceed to checkout and install FreeSWITCH as usual.
5. Configure the freetdm.conf spans to use CAS channels in E1 mode. The following samples assume you use span 1. You can use either Zaptel/DAHDI or Sangoma Wanpipe mode.
Before looking at the configuration, let me explain a bit better what Zaptel/DAHDI or Sangoma Wanpipe mode means. When I talk about Zaptel, I mean Zaptel or DAHDI, both are supported.
Sangoma Wanpipe mode is used when you have a Sangoma board (Although Sangoma cards can also be used in Zaptel/DAHDI mode).
Zaptel mode is used typically when you have a Zaptel compatible board, like Sangoma or Digium boards. However if you have a Sangoma board there is no point in using it in Zaptel mode for FreeSWITCH, Sangoma boards support Zaptel mode just to be able to plug into Asterisk channel driver chan_zap/chan_dahdi, but FreeSWITCH can use Sangoma boards directly in Wanpipe mode.
If you have a Sangoma board, you DON'T need Zaptel/DAHDI drivers, use Wanpipe mode and follow the instructions in the ./Setup script to install the drivers in API mode (The menu says which one for FreeSWITCH). More detailed instructions can be found at the Sangoma wiki: http://wiki.sangoma.com/wanpipe-freeswitch-install
At this date, the latest Sangoma drivers are 3.5.15
If you have a Zaptel compatible board, install the latest Zaptel/DAHDI drivers as usual (instructions can be found on voip-info.org I think)
Once you have installed either the Sangoma Wanpipe drivers or Zaptel/DAHDI drivers, you can proceed to configure /usr/local/freeswitch/conf/autoload_configs/freetdm.conf (the prefix /usr/local/freeswitch assumes you installed freetdm as part of FreeSWITCH).
For Wanpipe mode:
For Zaptel/DAHDI mode:
Remember that Zaptel/DAHDI spans channel numbering starts at 1 and keeps incrementing across spans up to infinity, where Wanpipe channel specification always is span based
That is, regardless of how many spans you have, you will not have any channel higher than 31, where in Zaptel/DAHDI, for span 2 you would start at channel 32.
6. Configure FreeSWITCH to use R2 spans, edit /usr/loca/freeswitch/conf/autoload_configs/freetdm.conf.xml and add the R2 spans:
There is documentation about each parameter in the sample configuration provided inside libs/freetdm/conf/freetdm.conf.xml
There is no parameters to set openr2_context_t::dial_with_dtmf and openr2_context_t::detect_dtmf. So if you want to use standart DTMF instead of MF, you should modify r2proto.c (some function, e.g. :: r2config_itu(1)) or ftmod_r2.c :: ftdm_r2_configure_span_signaling(3).
FreeTDM OpenR2 Commands
From the FreeSWITCH CLI you can execute:
That will show you the status and basic configuration for the span 1, like this:
Other misc commands: