<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">Hi all,<div>recently, I use sangoma A400 analog &nbsp;for outgoing call, the flow is internal sip phone-&gt; FXO-&gt;pstn.</div><div>but, when the pstn side hangup first, the sip phone never be hangup, i search here and there, i also try use&nbsp;</div><div>tone_detect app in dialplan , but ,still it can not detect busy tone, &nbsp;below is my dialplan:</div><div><br></div><div>&nbsp;&lt;action application="set" data="sip_h_X-accountcode=${accountcode}" /&gt;</div><div>&nbsp; 5 &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="pre_answer"/&gt;</div><div>&nbsp; 7 &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="tone_detect" data="busy 450 r 0 hangup 'normal_clearing' &nbsp;4"/&gt;</div><div>&nbsp; 8 &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="set" data="sip_h_X-Tag=" /&gt;</div><div>&nbsp; 9 &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="set" data="call_direction=outbound" /&gt;</div><div>&nbsp;10 &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="set" data="hangup_after_bridge=true" /&gt;</div><div>&nbsp;11 &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="set" data="inherit_codec=true" /&gt;</div><div>&nbsp;12 &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="set" data="continue_on_fail=true" /&gt;</div><div><span style="line-height: 1.7;">&nbsp;13 &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="bridge" data="freetdm/FXO/a/$1" /&gt;</span>&nbsp;</div><div><br></div><div>my country busy tone frequency is 450, i never see detect busy tone in freeswitch log, &nbsp;what's &nbsp;more, when pstn side (modile )</div><div>hangup, the sip softphone will play &nbsp;<span style="line-height: 1.7;">DEFTONES continuly( filer rtp with wirshark, i cant play DEFTONES ) , but the call session never clear and no hangup signal got in freeswitch&nbsp;</span><span style="line-height: 1.7;">log.</span></div><div><span style="line-height: 1.7;"><br></span></div><div><span style="line-height: 1.7;">i check ftdm_io.c ,in function&nbsp;</span>ftdm_channel_process_media, it will detect tone, but from freeswitch log, i can only see Dial tone be&nbsp;</div><div>detect, below is code snap:</div><div><div>if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_PROGRESS_DETECT) &amp;&amp; !ftdm_channel_test_feature(ftdmchan, FTDM_CHANNEL_FEATURE_PROGRESS)) {</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>uint32_t i;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>for (i = 1; i &lt; FTDM_TONEMAP_INVALID; i++) {</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>if (ftdmchan-&gt;span-&gt;tone_finder[i].tone_count) {</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>if (ftdmchan-&gt;needed_tones[i] &amp;&amp; teletone_multi_tone_detect(&amp;ftdmchan-&gt;span-&gt;tone_finder[i], sln, (int)slen)) {</div><div><span class="Apple-tab-span" style="white-space:pre">                                                </span>if (++ftdmchan-&gt;detected_tones[i]) {</div><div><span class="Apple-tab-span" style="white-space:pre">                                                        </span>ftdmchan-&gt;needed_tones[i] = 0;</div><div><span class="Apple-tab-span" style="white-space:pre">                                                        </span>ftdmchan-&gt;detected_tones[0]++;</div><div><span class="Apple-tab-span" style="white-space:pre">                                                </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>}</div><div><span class="Apple-tab-span" style="white-space: pre;">                </span>}</div></div><div><span style="line-height: 1.7;"><br></span></div><div><span style="line-height: 1.7;">I know that , in asterisk , the zaptel have several option in deal with disconect surpervision, but it seems little in freetdm.</span></div><div><br></div><div>any &nbsp;prompt is grateful!</div><div><span style="line-height: 1.7;">thanks.</span></div><div>&nbsp;&nbsp;</div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"><span title="neteasefooter"><span id="netease_mail_footer"><a href="#" target="_blank"></a></span></span>
</span></span>