<div dir="ltr">







<p class=""><span class="">This worked:</span></p><p class=""><span class="">&lt;action </span><span class="">application</span><span class="">=</span><span class="">&quot;spandsp_start_fax_detect&quot;</span><span class=""> </span><span class="">data</span><span class="">=</span><span class="">&quot;transfer &#39;fax&#39; 10 ced&quot;</span><span class="">/&gt;</span></p><p class=""><span class=""></span></p><p class=""><span class="">From documentation:</span></p><p style="margin:0.4em 0px 0.5em;line-height:1.5em;color:rgb(0,0,0);font-family:sans-serif;font-size:12.8px">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) <span style="font-size:12.8px">tone_type can be set to &quot;ced&quot; to detect CED tones (receiving side).</span></p><p class=""><span class=""><a href="https://wiki.freeswitch.org/wiki/Mod_spandsp#Controlling_the_app">https://wiki.freeswitch.org/wiki/Mod_spandsp#Controlling_the_app</a><br></span></p><div><span class=""><br></span></div><p class=""><span class=""><br></span></p></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 12, 2016 at 11:41 PM, Gonzalo Gasca Meza <span dir="ltr">&lt;<a href="mailto:gascagonzalo@gmail.com" target="_blank">gascagonzalo@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">







<p><span>Hi all,</span></p><p><span>I&#39;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&#39;t seem to detect the FAX. <a href="http://pastebin.com/0F6M1DSe" target="_blank"><span>http://pastebin.com/0F6M1DSe</span></a> </span></p><p><span>Topology:</span></p><p><span>Freeswitch --&gt; SIP Provider -- PSTN ---&gt; Fax machine</span></p><p><span>Only when I try from CLI invoking </span>spandsp_start_fax_detect it works: </p><p>originate {ignore_early_media=&#39;true&#39;,fax_enable_t38=true,fax_verbose=true,fax_use_ecm=false,fax_enable_t38_request=false}sofia/gateway/twilio/<a href="tel:%2B18884732963" value="+18884732963" target="_blank">+18884732963</a> &#39;spandsp_start_fax_detect:txfax /tmp/txfax-sample.tiff 10 ced,sleep:10000&#39; inline</p>
<p>These are the logs using Freeswitch Cookbook sample:</p><p></p><p><span></span></p><p><a href="http://pastebin.com/0F6M1DSe" target="_blank">http://pastebin.com/0F6M1DSe</a></p><div><br></div><div><p><span>I have tried the following combinations without success:</span></p><p><span><br></span></p><p>&lt;action application=&quot;export&quot; data=&quot;execute_on_fax_detect=&#39;execute_extension fax&#39;&quot;/&gt;</p><p>&lt;action application=&quot;spandsp_start_fax_detect&quot; data=&quot;txfax &#39;/tmp/txfax-sample.tiff 10 ced&#39;&quot;/&gt;</p><p>&lt;action application=&quot;spandsp_start_fax_detect&quot; data=&quot;transfer &#39;fax XML default&#39; 2&quot;/&gt;</p><p><span></span></p><p>&lt;action application=&quot;spandsp_start_fax_detect&quot; data=&quot;transfer &#39;9179 XML default&#39; 2&quot;/&gt;</p></div><div><br></div><p><span>This is my config <span><a href="http://pastebin.com/6Awmxk14" target="_blank">http://pastebin.com/6Awmxk14</a></span></span></p><p><br></p><p>   &lt;extension name=&quot;telephonist&quot;&gt;</p><p>         &lt;condition field=&quot;destination_number&quot; expression=&quot;^handle_calls$&quot;&gt;</p><p>                &lt;action application=&quot;answer&quot;/&gt;</p><p>                &lt;action application=&quot;log&quot; data=&quot;INFO handle_calls application match&quot;/&gt;</p><p>                &lt;action application=&quot;set&quot; data=&quot;fax_verbose=true&quot;/&gt;</p><p>                &lt;action application=&quot;set&quot; data=&quot;transfer_ringback=${us-ring}&quot;/&gt;</p><p>                &lt;action application=&quot;export&quot; data=&quot;execute_on_fax_detect=&#39;execute_extension fax&#39;&quot;/&gt;</p><p>                &lt;action application=&quot;playback&quot; data=&quot;silence_stream://20000&quot;/&gt;</p><p>                &lt;action application=&quot;hangup&quot;/&gt;</p><p>         &lt;/condition&gt;</p><p>   &lt;/extension&gt;</p><p><br></p><p><br></p><p>   &lt;extension name=&quot;fax_handler&quot;&gt;</p><p>      &lt;condition field=&quot;destination_number&quot; expression=&quot;^fax$&quot;&gt;</p><p>        &lt;action application=&quot;log&quot; data=&quot;INFO FAX detected&quot;/&gt;</p><p>        &lt;action application=&quot;txfax&quot; data=&quot;/tmp/txfax-sample.tiff 10 ced&quot;/&gt;</p><p>        &lt;action application=&quot;log&quot; data=&quot;INFO FAX completed&quot;/&gt;</p><p>        &lt;action application=&quot;hangup&quot;/&gt;</p><p>      &lt;/condition&gt;</p><p>    &lt;/extension&gt;</p><p><br></p><p>    &lt;extension name=&quot;fax_receive&quot;&gt;</p><p>      &lt;condition field=&quot;destination_number&quot; expression=&quot;^9178$&quot;&gt;</p><p>        &lt;action application=&quot;answer&quot; /&gt;</p><p>        &lt;action application=&quot;playback&quot; data=&quot;silence_stream://2000&quot;/&gt;</p><p>        &lt;action application=&quot;rxfax&quot; data=&quot;$${temp_dir}/rxfax.tif&quot;/&gt;</p><p>        &lt;action application=&quot;hangup&quot;/&gt;</p><p>      &lt;/condition&gt;</p><p>    &lt;/extension&gt;</p><p><br></p><p>    &lt;extension name=&quot;fax_transmit&quot;&gt;</p><p>      &lt;condition field=&quot;destination_number&quot; expression=&quot;^9179$&quot;&gt;</p><p>        &lt;action application=&quot;txfax&quot; data=&quot;$${temp_dir}/txfax-sample.tiff&quot;/&gt;</p><p>        &lt;action application=&quot;hangup&quot;/&gt;</p><p>      &lt;/condition&gt;</p><p>    &lt;/extension&gt;</p><p><br></p><p><br></p><p>Thanks</p><p><br></p></div>
</blockquote></div><br></div>