<div dir="ltr">
<p class=""><span class="">This worked:</span></p><p class=""><span class=""><action </span><span class="">application</span><span class="">=</span><span class="">"spandsp_start_fax_detect"</span><span class=""> </span><span class="">data</span><span class="">=</span><span class="">"transfer 'fax' 10 ced"</span><span class="">/></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 "ced" 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"><<a href="mailto:gascagonzalo@gmail.com" target="_blank">gascagonzalo@gmail.com</a>></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'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. <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 --> SIP Provider -- PSTN ---> 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='true',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> 'spandsp_start_fax_detect:txfax /tmp/txfax-sample.tiff 10 ced,sleep:10000' 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><action application="export" data="execute_on_fax_detect='execute_extension fax'"/></p><p><action application="spandsp_start_fax_detect" data="txfax '/tmp/txfax-sample.tiff 10 ced'"/></p><p><action application="spandsp_start_fax_detect" data="transfer 'fax XML default' 2"/></p><p><span></span></p><p><action application="spandsp_start_fax_detect" data="transfer '9179 XML default' 2"/></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> <extension name="telephonist"></p><p> <condition field="destination_number" expression="^handle_calls$"></p><p> <action application="answer"/></p><p> <action application="log" data="INFO handle_calls application match"/></p><p> <action application="set" data="fax_verbose=true"/></p><p> <action application="set" data="transfer_ringback=${us-ring}"/></p><p> <action application="export" data="execute_on_fax_detect='execute_extension fax'"/></p><p> <action application="playback" data="silence_stream://20000"/></p><p> <action application="hangup"/></p><p> </condition></p><p> </extension></p><p><br></p><p><br></p><p> <extension name="fax_handler"></p><p> <condition field="destination_number" expression="^fax$"></p><p> <action application="log" data="INFO FAX detected"/></p><p> <action application="txfax" data="/tmp/txfax-sample.tiff 10 ced"/></p><p> <action application="log" data="INFO FAX completed"/></p><p> <action application="hangup"/></p><p> </condition></p><p> </extension></p><p><br></p><p> <extension name="fax_receive"></p><p> <condition field="destination_number" expression="^9178$"></p><p> <action application="answer" /></p><p> <action application="playback" data="silence_stream://2000"/></p><p> <action application="rxfax" data="$${temp_dir}/rxfax.tif"/></p><p> <action application="hangup"/></p><p> </condition></p><p> </extension></p><p><br></p><p> <extension name="fax_transmit"></p><p> <condition field="destination_number" expression="^9179$"></p><p> <action application="txfax" data="$${temp_dir}/txfax-sample.tiff"/></p><p> <action application="hangup"/></p><p> </condition></p><p> </extension></p><p><br></p><p><br></p><p>Thanks</p><p><br></p></div>
</blockquote></div><br></div>