[Freeswitch-users] Strange RXFAX Delay - Hangup Hook

Ryan Harris ryharris at airmail.cc
Fri Aug 17 19:53:23 UTC 2018


On 08/13/2018 08:13 PM, Tim Bowyer wrote:

> Hi All,
>
>  
>
> Have been pulling my hair out trying to work out why we’re getting a
> strange delay upon completion of a t38 fax using rxfax.
>
> Upon finishing the receiving of a fax, and sending BYE to the
> originator, freeswitch seems to keep the channel open for exactly 30
> seconds then tries to issue another hangup.
>
> Have tried all sorts of things in dialplan, including moving the
> answer to before the hangup hook – I prefer the answer to be post
> hangup hook to aid in hunting to different servers in case of API call
> failures.
>
>  
>
> What’s also weird, 30 seconds after rxfax completes there are debug
> entries for time stamps in the CLI from calls in the past?!@
>
> If I do a show channels at idle – there are 0 total
>
>  
>
> freeswitch at 7f9729cbe5af> show channels
>
>  
>
> 0 total.
>
>  
>
> ----------------------------
>
> Dialplan as follows
>
> ----------------------------
>
>  
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
>
> <document type="freeswitch/xml">
>
>   <section name="dialplan" description="Incoming Fax">
>
>     <context name="public">
>
>       <extension name="Fax{{ destination_number }}">
>
>         <condition field="destination_number" expression="^({{
> destination_number }})$">
>
>            <action application="set" data="api_hangup_hook=system
> /data/python/process_fax.py {{ uuid }} /tmp/{{ uuid }}.tif {{ formats
> }} --caller {{ caller }} --fax_result_code
> \\\${fax_result_$........................cut
> <file:///$%7bfax_result_$........................cut>
>
>            <action application="answer" />
>
>                    <action application="playback"
> data="silence_stream://2000"/>
>
>            {% if subscription.verbose_logging %}
>
>            <action application="set" data="fax_verbose=true"/>
>
>            {% endif %}
>
>                    <action application="set"
> data="fax_enable_t38_request=true"/>
>
>                    <action application="set" data="fax_enable_t38=true"/>
>
>                                                                   
> <action application="set" data="fax_ident={{
> subscription.rendered_fax_ident }}"/>
>
>                    <action application="set" data="fax_header={{
> subscription.rendered_fax_header }}"/>
>
>                    <action application="rxfax" data="/tmp/{{ uuid
> }}.tif"/>
>
>                    <action application="hangup"/>
>
>        </condition>
>
>       </extension>
>
>     </context>
>
>   </section>
>
> </document>
>
>  
>

I'd avoid using `system`. Instead try `bg_system`. Or even better yet,
create an event listener that does the job somewhere else external to
FreeSWITCH.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180817/3ca9d4e0/attachment-0001.html>


More information about the FreeSWITCH-users mailing list