Configuration OpenZap-DigiumTE220-Example

From FreeSWITCH Wiki
Jump to: navigation, search


Digium TE220 Card

Insert the Digium TE220 card in the machine and ensure that it is properly inserted and detected by your system when it boot up.

Installing Zaptel Driver

For installing zaptel driver refer OpenZAP


Once you have completed the zaptel installation, check whether the green LED is glowing on your TE220 card. You can also check the status of your card by using zttool command, which comes with the zaptel installation.

If you want to install FreeSWITCH with libpri support refer OpenZAP#OpenZAP Installation

When you compile the Freeswitch code, make sure you have included OpenZAP module by uncommenting the following line in ${Freeswitch_src)/modules.conf


Example openzap.conf for Zaptel

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

Example openzap.conf.xml with libpri support

<configuration name="openzap.conf" description="OpenZAP Configuration">
    <param name="debug" value="7"/>
 <span name="PRI_1"> 
     <param name="node" value="cpe"/>
     <param name="switch" value="euroisdn"/>
     <param name="dialplan" value="XML"/>
     <param name="context" value="default"/>
     <param name="l1" value="alaw"/>

Example openzap.conf.xml

<configuration name="openzap.conf" description="OpenZAP Configuration">
   <param name="debug" value="7"/>
  <span id="1" name="PRI_1"> 
    <param name="q921loglevel" value="alert"/>
    <param name="q931loglevel" value="alert"/>
    <param name="mode" value="user"/>
    <param name="dialect" value="q931"/>
    <param name="dialplan" value="XML"/>
    <param name="context" value="default"/>

Making it work

Copy the openzap.conf into/usr/local/freeswitch/conf/

Copy the openzap.conf.xml into /usr/local/freeswitch/conf/autoload_configs

Uncomment the line <load module ="mod_openzap"/> in /usr/local/freeswitch/conf/autoload_configs/modules.conf.xml.

Now start the FreeSWITCH.

Once OpenZAP is loaded, it will install a command named "oz". You can use that to debug. To print the libpri debug message enter the following command in the FreeSWITCH CLI.

oz libpri debug 1 all ( 1 is referring to the 1st span )

Enter the below command in the CLI to see the number of spans and channels that are configured.

oz list

Example Dialplan

The dialplan below will call to a 10 digit number

<extension name="openzap">
  <condition field="destination_number" expression="^(\d{10})$">
     <action application="bridge" data="openzap/1/1/$1"/>

See Also