Skip to main content

Openzap.conf Examples

Examples for specific cards

Wildcard T100P

  • Wildcard T100P (should also work with similar zaptel cards), This example will apply for digium T1 cards as well:
[span zt name_of_span]
trunk_type => t1
b-channel => 1-23
d-channel=> 24

the name_of_span is the name of span that matches the one you set up in autoload_config/openzap.conf.xml. span zt means you are using zaptel.

PhonicEQ TE100P

  • This T1 PRI configuration is very similar to the Wildcard T100P and Tormeta2 configurations.
[span zt PRI_1]
name => OpenZAP
number => 1
trunk_type => t1
b-channel => 1-23
d-channel => 24
  • The /etc/zaptel.conf file generated by kernel/xpp/utils/genzaptelconf -d
# Span 1: WCT1/0 "PhonicEQ Inc. T100P RAVEN T1/PRI Card 0" (MASTER)
span=1,1,0,esf,b8zs
# termtype: te
bchan=1-23
dchan=24

# Global data

loadzone = us
defaultzone = us

Sangoma A10X

T1

 [span wanpipe PRI_1]
trunk_type => t1
b-channel => 1:1-23
d-channel=> 1:24

E1

 [span wanpipe PRI_1]
trunk_type => e1
b-channel => 1:1-15
d-channel=> 1:16
b-channel => 1:17-31

Note: PRI_1 is the name of the span defined in conf/autoload_configs/openzap.conf.xml.

HFC 4 BRI

  • trunk_type => bri_ptmp is for Point-To-MultiPoint protocol
  • trunk_type => bri is for Point-To-Point protocol
[span zt BRI1]
trunk_type => bri_ptmp
b-channel => 1-2
d-channel=> 3

[span zt BRI2]
trunk_type => bri_ptmp
b-channel => 4-5
d-channel=> 6

[span zt BRI3]
trunk_type => bri
b-channel => 7-8
d-channel=> 9

[span zt BRI4]
trunk_type => bri
b-channel => 10-11
d-channel=> 12

Sangoma A200/A400

  • A200, A200D, A400, A400D series and variants

The configuration depends on whether wanpipe is configured to use Zaptel TDM Voice, or the Sangoma standalone TDM Voice API. This is determined in the installation and configuration of the Sangoma wanpipe software.

If wanpipe is using Zaptel, you need to configure openzap.conf with [span zt] entries. For example, if ports 1 and 2 are FXO (e.g. configured to accept analog phone connections), and ports 3 and 4 are FXS (e.g. configured to accept PSTN analog lines) you will need:

/usr/local/freeswitch/conf/openzap.conf:

[span zt FXS]
name => OpenZAP
number => 3001
fxs-channel => 1
number => 3002
fxs-channel => 2

[span zt FXO]
name => OpenZAP
number => 4165551111
fxo-channel => 3
number => 4165552222
fxo-channel => 4

If wanpipe is standalone, you need to configure openzap.conf with [span wanpipe] entries. For the same example as above this would be:

/usr/local/freeswitch/conf/openzap.conf:

[span wanpipe FXS]
# This is the value of the callerid_name variable that is raised in the dialplan
name => Analog Phone 1
# This is the value of the callerid_number variable that is raised in the dialplan
number => 3001
fxs-channel => 1:1
name => Analog Phone 2
number => 3002
fxs-channel => 1:2

[span wanpipe FXO]
# the chan_name variable will raised as "OpenZAP/2:1/4165551111" in dialplan when an incoming call arrives on this port
name => PSTN line 1
number => 4165551111
fxo-channel => 1:3
name => PSTN line 2
number => 4165552222
fxo-channel => 1:4

Also, note that in addition to configuring /usr/local/freeswitch/conf/openzap.conf, you need to properly configure openzap.conf.xml in freeswitch/conf/autoload_configs/.

/usr/local/freeswitch/conf/autoload_configs/openzap.conf.xml

<configuration name="openzap.conf" description="OpenZAP Configuration">
<settings>
<param name="debug" value="0"/>
<param name="hold-music" value="$${moh_uri}"/>
</settings>
<!-- one entry here per openzap span -->
<analog_spans>
<span id="FXS">
<!-- This is where the calls coming on this span will be directed -->
<param name="dialplan" value="XML"/>
<param name="context" value="default"/>
<param name="enable_callerid" value="true"/> <--! This is the default value anyway -->
</span>
<span id="FXO">
<param name="dialplan" value="XML"/>
<param name="context" value="default"/>
<!-- Set this to the correct value for your area, to get the
correct tones on the phones connected to the FXS ports -->
<param name="tonegroup" value="us"/>
<param name="enable_callerid" value="true"/>
</span>
</analog_spans>
</configuration>

Recent versions of the sangoma wanpipe drivers (3.5.x) include a tool (wancfg_fs) to generate this file for you, but you still have to make some modifications to match your setup.

Tormenta2

  • A sample Tor2 setup with spans 1 and 2 set for FXO/FXS and spans 3 and 4 set for PRI, corresponds to Second openzap.conf.xml example:
[span zt FXS1]
name => OpenZAP
number => 1
fxs-channel => 1-24

[span zt FXO1]
name => OpenZAP
number => 2
fxo-channel => 25-48
# Note: when using FXO/FXS on a digital span, do not set the trunk_type; OpenZAP will do it automatically

[span zt PRI1]
name => OpenZAP
number => 3
trunk_type => t1
b-channel => 49-71
d-channel => 72

[span zt PRI2]
name => OpenZAP
number => 4
trunk_type => t1
b-channel => 73-95
d-channel => 96
  • The /etc/zaptel.conf file for this tor2 config looks something like this:
## Test FreeSWITCH/OpenZAP config

span=1,0,0,esf,b8zs # FS to FXS span
fxoks=1-24

span=2,0,0,esf,b8zs # FS to FXO span
fxsks=25-48

span=3,1,0,esf,b8zs # PRI circuit
bchan=49-71
dchan=72

span=4,1,0,esf,b8zs # PRI circuit
bchan=73-95
dchan=96

# Global data

loadzone = us
defaultzone = us

Digium TDM400

  • A sample Digium TDM400 setup with spans 3 and 4 set for FXO and span 1 for FXS
  • note: please do not use fxo-channel => x:, you can however use fxo-channel => 3,4
[span zt FXS1]
name => OpenZAP-FXS
number => 1
fxs-channel => 1

[span zt FXO1]
name => OpenZAP-FXO1
number => 2
fxo-channel => 3

[span zt FXO2]
name => OpenZAP-FXO2
number => 3
fxo-channel => 4

Xorcom Astribank USB With 32 FSX ports =

/usr/local/freeswitch/conf/autoload_configs/openzap.conf.xml

<configuration name="openzap.conf" description="OpenZAP Configuration">
<settings>
<param name="debug" value="0"/>
<!--<param name="hold-music" value="$${moh_uri}"/>-->
<!--<param name="enable-analog-option" value="call-swap"/>-->
<!--<param name="enable-analog-option" value="3-way"/>-->
</settings>
<!-- one entry here per openzap span -->
<analog_spans>
<span name="SPAN1" id="1">
<!--<param name="hold-music" value="$${moh_uri}"/>-->
<!--<param name="enable-analog-option" value="call-swap"/>-->
<!--<param name="enable-analog-option" value="3-way"/>-->
<param name="tonegroup" value="us"/>
<param name="digit-timeout" value="2000"/>
<param name="max-digits" value="11"/>
<param name="dialplan" value="XML"/>
<param name="context" value="default"/>
<param name="enable-callerid" value="true"/>
<!-- regex to stop dialing when it matches -->
<!--<param name="dial-regex" value="5555"/>-->
<!-- regex to stop dialing when it does not match -->
<!--<param name="fail-dial-regex" value="^5"/>-->
</span>
<span name="SPAN2" id="2">
<!--<param name="hold-music" value="$${moh_uri}"/>-->
<!--<param name="enable-analog-option" value="call-swap"/>-->
<!--<param name="enable-analog-option" value="3-way"/>-->
<param name="tonegroup" value="us"/>
<param name="digit-timeout" value="2000"/>
<param name="max-digits" value="11"/>
<param name="dialplan" value="XML"/>
<param name="context" value="default"/>
<param name="enable-callerid" value="true"/>
<!-- regex to stop dialing when it matches -->
<!--<param name="dial-regex" value="5555"/>-->
<!-- regex to stop dialing when it does not match -->
<!--<param name="fail-dial-regex" value="^5"/>-->
</span>
<span name="SPAN3" id="3">
<!--<param name="hold-music" value="$${moh_uri}"/>-->
<!--<param name="enable-analog-option" value="call-swap"/>-->
<!--<param name="enable-analog-option" value="3-way"/>-->
<param name="tonegroup" value="us"/>
<param name="digit-timeout" value="2000"/>
<param name="max-digits" value="11"/>
<param name="dialplan" value="XML"/>
<param name="context" value="default"/>
<param name="enable-callerid" value="true"/>
<!-- regex to stop dialing when it matches -->
<!--<param name="dial-regex" value="5555"/>-->
<!-- regex to stop dialing when it does not match -->
<!--<param name="fail-dial-regex" value="^5"/>-->
</span>
<span name="SPAN4" id="4">
<!--<param name="hold-music" value="$${moh_uri}"/>-->
<!--<param name="enable-analog-option" value="call-swap"/>-->
<!--<param name="enable-analog-option" value="3-way"/>-->
<param name="tonegroup" value="us"/>
<param name="digit-timeout" value="2000"/>
<param name="max-digits" value="11"/>
<param name="dialplan" value="XML"/>
<param name="context" value="default"/>
<param name="enable-callerid" value="true"/>
<!-- regex to stop dialing when it matches -->
<!--<param name="dial-regex" value="5555"/>-->
<!-- regex to stop dialing when it does not match -->
<!--<param name="fail-dial-regex" value="^5"/>-->
</span>
</analog_spans>
</configuration>

Openzap.conf

[span zt SPAN1]
number => 1
fxs-channel => 1-8

[span zt SPAN2]
number => 2
fxs-channel => 15-22

[span zt SPAN3]
number => 3
fxs-channel => 23-30

[span zt SPAN4]
number => 4
fxs-channel => 31-38

This gets 8 channels on 4 spans up (32 total), as we have 8 FSX ports per span. lsdahdi should show your span map so your fxs- or fxo- channels can be modified depending on your hardware setup.

Dialplan

Here's a sample dialstring from directory/default/myextension.xml

<param name="dial-string" value="openzap/1/8" />

Which rings port 8 on span 1 on the astribank.

See Also