<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>On 08/13/2018 08:13 PM, Tim Bowyer wrote:<br>
</p>
<blockquote type="cite"
cite="mid:ME1PR01MB1315B5EAB0A7DB7B1090C9E391380@ME1PR01MB1315.ausprd01.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hi All,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">What’s also weird, 30 seconds after rxfax
completes there are debug entries for time stamps in the CLI
from calls in the past?!@<o:p></o:p></p>
<p class="MsoNormal">If I do a show channels at idle – there are
0 total<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">freeswitch@7f9729cbe5af>
show channels<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">0 total.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">----------------------------<o:p></o:p></p>
<p class="MsoNormal">Dialplan as follows<o:p></o:p></p>
<p class="MsoNormal">----------------------------<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><?xml
version="1.0" encoding="UTF-8" standalone="no"?><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><document
type="freeswitch/xml"><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"> <section
name="dialplan" description="Incoming Fax"><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"> <context
name="public"><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<extension name="Fax{{ destination_number }}"><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<condition field="destination_number" expression="^({{
destination_number }})$"><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<action application="set" data="api_hangup_hook=system
/data/python/process_fax.py {{ uuid }} /tmp/{{ uuid }}.tif {{
formats }} --caller {{ caller }} --fax_result_code
<a href="file:///$%7bfax_result_$........................cut"
moz-do-not-send="true">\\\${fax_result_$........................cut</a><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<action application="answer" /><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<action application="playback"
data="silence_stream://2000"/><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"> {% if
subscription.verbose_logging %}<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<action application="set" data="fax_verbose=true"/><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"> {%
endif %}<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<action application="set"
data="fax_enable_t38_request=true"/><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<action application="set" data="fax_enable_t38=true"/><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<action application="set" data="fax_ident={{
subscription.rendered_fax_ident }}"/><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<action application="set" data="fax_header={{
subscription.rendered_fax_header }}"/><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<action application="rxfax" data="/tmp/{{ uuid }}.tif"/><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<action application="hangup"/><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">
</condition><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">
</extension><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">
</context><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">
</section><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"></document><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
<br>
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.<br>
</body>
</html>