Misc. Dialplan Tools fax detect

From FreeSWITCH Wiki
Revision as of 11:53, 20 May 2010 by Diego.viola (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.