Misc. Dialplan Tools fax detect

From FreeSWITCH Wiki
Jump to: navigation, search

To detect a fax, you can use the following XML in your dialplan:

<action application="tone_detect" data="fax 1100 r +5000 transfer fax XML default" />

When a fax is detected, the call will be routed to context=default, extension name=fax in the dialplan.

<context name="default">
    <extension name="fax">
      <condition field="destination_number" expression="^fax$">
        <action application="answer"/>
	<action application="sleep" data="1000"/>
        <action application="set" data="fax_file_name=/tmp/fax/${caller_id_number}-${strftime(%Y-%m-%d-%H-%M-%S)}.tiff"/>
        <action application="set" data="fax_mode=recv"/>
        <action application="socket" data=" async"/>
        <action application="hangup"/>

The above example assuming you are using Faxlib.jm to receive fax.