Skip to main content

T38 Modem


If you want to explore Hylafax with FreeSWITCH, you will need T38modem as a conduit between them.

Click here to expand Table of Contents


You can get the latest version Here


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
make all
make install
cd ../opal
make all
make install
cd ..
tar xvzf t38modem-2.0.0.tgz
export PTLIBDIR=../ptlib
export OPALDIR=../opal
make USE_OPAL=1 opt


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"/>

Inbound dialplan. This assumes that you have 5 instances of t38modem listening. Calls to 1000-1004 from the gateway at will be routed to t38modem0 through t38modem4.

Fax inbound

<extension name="from_gateway_fax" >
<condition field="network_addr" expression=""/>
<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}"/>