T38 Modem
About
If you want to explore Hylafax with FreeSWITCH, you will need T38modem as a conduit between them.
Click here to expand Table of Contents
- 1 Download
- 2 Installation
- 3 Dialplans
Download
You can get the latest version Here
Installation
Dependencies OPAL and PTLIB libraries are included in the download page in one package opal-24174.tgz. Note: Use only this package for OPAL and PTLIB as the more recent versions will not work with version 2.0.0 of T38modem.
Building T.38 Modem
tar xvzf opal-24174.tgz
cd ptlib
./configure
make all
make install
cd ../opal
./configure
make all
make install
cd ..
tar xvzf t38modem-2.0.0.tgz
cdt38modem-2.0.0
export PTLIBDIR=../ptlib
export OPALDIR=../opal
make USE_OPAL=1 opt
Dialplans
Outbound dialplan:
Fax outbound
<extension name="faxout">
<condition field="ani" expression="^t38modem.*$"/>
<condition field="destination_number" expression="^9(\d{8,15})$">
<action application="set" data="absolute_codec_string=PCMU"/>
<action application="set" data="fax_enable_t38=true"/>
<action application="set" data="sip_execute_on_image=t38_gateway self nocng"/>
<action application="bridge" data="sofia/gateway/outboundgateway/$1"/>
</condition>
</extension>
Inbound dialplan. This assumes that you have 5 instances of t38modem listening. Calls to 1000-1004 from the gateway at 10.10.0.2 will be routed to t38modem0
through t38modem4
.
Fax inbound
<extension name="from_gateway_fax" >
<condition field="network_addr" expression="10.10.0.2"/>
<condition field="context" expression="default"/>
<condition field="destination_number" expression="^100([0-4])$">
<action application="bridge" data="{sip_execute_on_image='t38_gateway self nocng'}user/t38modem$1@${domain_name}"/>
</condition>
</extension>