[Freeswitch-users] Fax detection for outbound calls

Yehavi Bourvine yehavi.bourvine at gmail.com
Sun Jul 17 08:41:57 MSD 2016


Hi,

  I would like to use this thread to ask further about this appication. Up
to now I used execute_on_tone_detect, and tried changing it to
spandsp_start_fax_detect.

When a call arrives to a registered extension, it works like a charm.
However, I have  a few dedicated fax extensions which has no phone
registered, thus they arrive directly to voicemail. When this happens, I
get a console message "Max Tones Reached!" and no fax is detected. Any idea
what I am doing wrong?

I am running version 1.6.9.

 Thanks! __Yehavi:

2016-07-13 10:15 GMT+03:00 Gonzalo Gasca Meza <gascagonzalo at gmail.com>:

> 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
>>
>>
>>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160717/ac904089/attachment.html 


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