[Freeswitch-users] Fax detection for outbound calls

Gonzalo Gasca Meza gascagonzalo at gmail.com
Wed Jul 13 11:15:44 MSD 2016


This worked:

<action application="spandsp_start_fax_detect" data="transfer 'fax' 10 ced"
/>

>From documentation:

Uses the spandsp code to detect fax tones which should be more reliable
than using tone_detect. By default, the application detects CNG tones
(sending side) tone_type can be set to "ced" to detect CED tones (receiving
side).

https://wiki.freeswitch.org/wiki/Mod_spandsp#Controlling_the_app



On Tue, Jul 12, 2016 at 11:41 PM, Gonzalo Gasca Meza <gascagonzalo at gmail.com
> wrote:

> Hi all,
>
> I'm configuring FS 1.7 to perform a dialout. If a fax is detected, I would
> like transfer call to an specific extension/application. I tried example in
> FreeSwitch cookbook, but doesn't seem to detect the FAX.
> http://pastebin.com/0F6M1DSe
>
> Topology:
>
> Freeswitch --> SIP Provider -- PSTN ---> Fax machine
>
> Only when I try from CLI invoking spandsp_start_fax_detect it works:
>
> originate
> {ignore_early_media='true',fax_enable_t38=true,fax_verbose=true,fax_use_ecm=false,fax_enable_t38_request=false}sofia/gateway/twilio/
> +18884732963 'spandsp_start_fax_detect:txfax /tmp/txfax-sample.tiff 10
> ced,sleep:10000' inline
>
> These are the logs using Freeswitch Cookbook sample:
>
> http://pastebin.com/0F6M1DSe
>
> I have tried the following combinations without success:
>
>
> <action application="export"
> data="execute_on_fax_detect='execute_extension fax'"/>
>
> <action application="spandsp_start_fax_detect" data="txfax
> '/tmp/txfax-sample.tiff 10 ced'"/>
>
> <action application="spandsp_start_fax_detect" data="transfer 'fax XML
> default' 2"/>
>
> <action application="spandsp_start_fax_detect" data="transfer '9179 XML
> default' 2"/>
>
> This is my config http://pastebin.com/6Awmxk14
>
>
>    <extension name="telephonist">
>
>          <condition field="destination_number" expression="^handle_calls$">
>
>                 <action application="answer"/>
>
>                 <action application="log" data="INFO handle_calls
> application match"/>
>
>                 <action application="set" data="fax_verbose=true"/>
>
>                 <action application="set"
> data="transfer_ringback=${us-ring}"/>
>
>                 <action application="export"
> data="execute_on_fax_detect='execute_extension fax'"/>
>
>                 <action application="playback"
> data="silence_stream://20000"/>
>
>                 <action application="hangup"/>
>
>          </condition>
>
>    </extension>
>
>
>
>    <extension name="fax_handler">
>
>       <condition field="destination_number" expression="^fax$">
>
>         <action application="log" data="INFO FAX detected"/>
>
>         <action application="txfax" data="/tmp/txfax-sample.tiff 10 ced"/>
>
>         <action application="log" data="INFO FAX completed"/>
>
>         <action application="hangup"/>
>
>       </condition>
>
>     </extension>
>
>
>     <extension name="fax_receive">
>
>       <condition field="destination_number" expression="^9178$">
>
>         <action application="answer" />
>
>         <action application="playback" data="silence_stream://2000"/>
>
>         <action application="rxfax" data="$${temp_dir}/rxfax.tif"/>
>
>         <action application="hangup"/>
>
>       </condition>
>
>     </extension>
>
>
>     <extension name="fax_transmit">
>
>       <condition field="destination_number" expression="^9179$">
>
>         <action application="txfax" data="$${temp_dir}/txfax-sample.tiff"/>
>
>         <action application="hangup"/>
>
>       </condition>
>
>     </extension>
>
>
>
> Thanks
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160713/45058aad/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list