<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:Arial;
        color:navy;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:28383203;
        mso-list-type:hybrid;
        mso-list-template-ids:-945513764 -1477961142 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Arial;
        mso-fareast-font-family:"Times New Roman";}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hmm&#8230; the plot thickens&#8230;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>When I bridge my FXO port to the SIP-GSM
gateway directly (i.e. without using mod_fifo) I don&#8217;t seem to need
monitor_early_media_fail. Using tone_detect on the A leg works fine when &#8220;ignore_early_media=true&#8221;
is used on the B leg:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>The following dialplan excerpt WORKS (i.e.
FXO hang-ups are detected at all stages by tone_detect):<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp; &lt;extension
name=&quot;pan_125&quot;&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;condition field=&quot;${freetdm_span_name}&quot;
expression=&quot;^span_fxo_helpdesk$&quot;&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;!-- Detect busy tone from Panasonic --&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;action application=&quot;tone_detect&quot; data=&quot;busy-pan 350,440 r 0
hangup undef 2&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;action application=&quot;answer&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;action application=&quot;set&quot;
data=&quot;continue_on_fail=true&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;action application=&quot;set&quot;
data=&quot;instant_ringback=true&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;action application=&quot;set&quot;
data=&quot;ringback=%(1000,1500,440.0,480.0)&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;action application=&quot;bridge&quot; data=&quot;{ignore_early_media=true}sofia/internal/1??????76??@192.168.3.11:5060&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;action application=&quot;bridge&quot; data=&quot;{ignore_early_media=true}sofia/internal/1??????77??@192.168.3.11:5060&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;/condition&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp; &lt;/extension&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>The problem seems to occur only when mod_fifo
is added to the mix:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp; &lt;extension
name=&quot;test2&quot;&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;condition field=&quot;${freetdm_span_name}&quot;
expression=&quot;^span_fxo_test$&quot;&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;!-- Detect busy tone from Panasonic --&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;action application=&quot;tone_detect&quot; data=&quot;busy-pan 350,440 r 0
hangup undef 2&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;action application=&quot;answer&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;action application=&quot;playback&quot; data=&quot;thankyou.wav&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;action application=&quot;set&quot;
data=&quot;fifo_music=$${hold_music}&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;action application=&quot;fifo&quot; data=&quot;fifo_helpdesk in&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;/condition&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp; &lt;/extension&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>In all cases: <o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>-<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font></span></span></font><![endif]><font size=2 color=navy
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>tone_detect
works BEFORE the call is handed to mod_fifo (i.e. during playback)<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>-<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font></span></span></font><![endif]><font size=2 color=navy
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>tone_detect
works AFTER the call is established by mod_fifo and audio is being exchanged
between A and B leg.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>IF the A leg (with tone_detect enabled) is
handed to mod_fifo AND there are no agents in the fifo THEN tone_detect does <b><span
style='font-weight:bold'>not</span></b> work. Mod_fifo simply plays MOH to the
A leg perpetually.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>IF the A leg (with tone_detect enabled) is
handed to mod_fifo AND mod_fifo places an outbound call with &#8220;ignore_early_media=<b><span
style='font-weight:bold'>true</span></b>&#8221; THEN tone_detect does <b><span
style='font-weight:bold'>not</span></b> work on the A leg during the early
media phase on leg B.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>IF the A leg (with tone_detect enabled) is
handed to mod_fifo AND mod_fifo places an outbound call with &#8220;ignore_early_media=<b><span
style='font-weight:bold'>false</span></b>&#8221; THEN tone_detect <b><span
style='font-weight:bold'>does</span></b> work. I guess this is because audio is
being exchanged between A and B legs.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Any idea what would cause the tone_detect
to be &#8220;suspended&#8221; when mod_fifo is in the mix?<o:p></o:p></span></font></p>

<div>

<p><font size=2 color=navy face="Times New Roman"><span style='font-size:10.0pt;
color:navy'>Cheers,<br>
-Slim<br>
--<br>
Jeroen C. &quot;Slim&quot; van Gelderen<br>
<br>
</span></font><o:p></o:p></p>

</div>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Jeroen C. van Gelderen<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, October 11, 2010
03:13<br>
<b><span style='font-weight:bold'>To:</span></b> 'FreeSWITCH Users Help'<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Freeswitch-users]
tone_detect vs. ignore_early_media (per leg?)</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thank you for the quick response.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>It looks like monitor_early_media_fail
should do what I need (thanks for the suggestion!) but I can&#8217;t seem to
make it work. See below for my uneducated best guess why.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>In my case the failure conditions from the
GSM side are handled out-of-band by SIP. That leaves only one failure condition
I need to listen for in early media (the Panasonic far-end hang up on FXO)
which can successfully be detected with:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp; &lt;action
application=&quot;tone_detect&quot; data=&quot;busy-pan 350,440 r 0 hangup&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>This results in the following log entries:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>[DEBUG] switch_ivr_async.c:2072 Adding
tone spec 350,440 index 0 hits 1<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>[DEBUG] switch_core_media_bug.c:360
Attaching BUG to FreeTDM/4:1/<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Translating tone_detect to
monitor_early_media_fail I tried the following:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp; &lt;action
application=&quot;set&quot; data=&quot;result=${fifo_member(add fifo_helpdesk
{fifo_member_wait=nowait,ignore_early_media=true,<b><span style='font-weight:
bold'>monitor_early_media_fail=busy-pan:1:350+440</span></b>}sofia/internal/${caller_id_number}@192.168.3.11:5060)}&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>This results in the following relevant log
entries:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>[DEBUG] switch_channel.c:2444
(sofia/internal/1876??????@192.168.3.11:5060) Callstate Change RINGING -&gt;
EARLY<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>[DEBUG] switch_ivr_async.c:2072 Adding
tone spec 350,440 index 0 hits 1<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>[DEBUG] switch_core_media_bug.c:360
Attaching BUG to sofia/internal/1??????7693@192.168.3.11:5060<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>So Freeswitch is listening for the right
tones (tone_spec present and identical to the one used in tone_detect approach)
but it isn&#8217;t detecting them. The obvious difference is in the BUG
attachment.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Is it possible that BUG isn&#8217;t
listening to the right (A) leg in the case of monitor_early_media_fail? Or is
this too easy? </span></font><font size=2 color=navy face=Wingdings><span
style='font-size:10.0pt;font-family:Wingdings;color:navy'>J</span></font><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><o:p></o:p></span></font></p>

<div>

<p style='margin-bottom:12.0pt'><font size=2 color=navy face="Times New Roman"><span
style='font-size:10.0pt;color:navy'>Cheers,<br>
-Slim<br>
--<br>
Jeroen C. &quot;Slim&quot; van Gelderen</span></font><o:p></o:p></p>

</div>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Michael Collins<br>
<b><span style='font-weight:bold'>Sent:</span></b> Sunday, October 10, 2010
19:01<br>
<b><span style='font-weight:bold'>To:</span></b> FreeSWITCH Users Help<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Freeswitch-users]
tone_detect vs. ignore_early_media (per leg?)</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Check out
monitor_early_media_fail:<br>
<a
href="http://wiki.freeswitch.org/wiki/Channel_Variables#monitor_early_media_fail">http://wiki.freeswitch.org/wiki/Channel_Variables#monitor_early_media_fail</a><br>
<br>
It is a hybrid of ignoring early media and listening to early media for various
conditions. In your case you'll need to play around with it. In your case you
need to figure out which early media scenarios count as a &quot;fail&quot; and
will cause processing to move on as if the call really did fail. <br>
<br>
Roll up your sleeves, you have some work to do. :)<br>
<br>
-MC<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>On Sat, Oct 9, 2010 at 9:24 PM, Jeroen C. van Gelderen &lt;<a
href="mailto:slim@thegreek.com">slim@thegreek.com</a>&gt; wrote:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Hi Guys,<br>
<br>
I have a legacy Panasonic PBX which does not support CPC/Disconnect<br>
Supervision. Calls from this PBX are sent to Freeswitch by way of<br>
DAHDI/FreeTDM FXO ports (on a Xorcom Astribank). I use tone_detect to deal<br>
with far-end hang-ups. This works fine:<br>
<br>
&lt;!-- Detect busy tone from Panasonic --&gt;<br>
&lt;action application=&quot;tone_detect&quot; data=&quot;busy 350,440 r 0
hangup 4&quot;/&gt;<br>
<br>
Some calls from the Panasonic PBX are put in a FIFO and from there they are<br>
sent to a SIP-to-GSM bridge (GoIP) to be terminated on one of 3 GSM phones<br>
in a round-robin fashion.<br>
<br>
The GSM bridge requires me to use &quot;ignore_early_media=true&quot; otherwise
the<br>
caller will receive messages like &quot;the number you are calling does not<br>
answer&quot;. When I set &quot;ignore_early_media=true&quot; the FIFO correctly
keeps<br>
hunting for a GSM phone that is actually answered and will ignore phones<br>
that are busy, no-answer or turned off. This too works fine.<br>
<br>
The problem occurs when the two are combined as follows:<br>
<br>
Panasonic PBX --FXO--&gt; Freeswitch --SIP--&gt; GSM-bridge<br>
<br>
If I enable ignore_early_media then tone_detect doesn't work UNTIL one of<br>
the GSMs is answered. This is a problem when none of the GSMs are answered<br>
and the Panasonic PBX hangs up. The FXO port will stay &quot;up&quot; and the
FIFO<br>
will keep hunting until it times out.<br>
<br>
If I don't use &quot;ignore_early_media=true&quot; then tone_detect works fine
but<br>
then every telco message gets mistaken for an answered call and the hunting<br>
stops early.<br>
<br>
I tried changing this example line from my fifo.conf:<br>
<br>
&lt;member timeout=&quot;30&quot; simo=&quot;1&quot; lag=&quot;5&quot;&gt;<br>
{member_wait=nowait,ignore_early_media=true}sofia/internal/1??????7701@192.1<br>
68.3.11:5060<br>
&lt;/member&gt;<br>
<br>
to<br>
<br>
&lt;member timeout=&quot;30&quot; simo=&quot;1&quot; lag=&quot;5&quot;&gt;<br>
{member_wait=nowait}[ignore_early_media=true]sofia/internal/1??????7701@192.<br>
168.3.11:5060<br>
&lt;/member&gt;<br>
<br>
in a vain attempt to ignore early media on the SIP leg only. This doesn't<br>
seem to do anything however.<br>
<br>
Can anyone clue me in on what I'm missing? I've snipped the relevant<br>
configuration bits below. I have the feeling I'm missing something obvious.<br>
<br>
Cheers,<br>
-Slim<br>
<br>
----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----<br>
<br>
&lt;configuration name=&quot;fifo.conf&quot; description=&quot;FIFO
Configuration&quot;&gt;<br>
&nbsp;&lt;settings&gt;<br>
&nbsp; &nbsp;&lt;param name=&quot;delete-all-outbound-member-on-startup&quot;
value=&quot;false&quot;/&gt;<br>
&nbsp;&lt;/settings&gt;<br>
&nbsp;&lt;fifos&gt;<br>
&nbsp; &nbsp;&lt;fifo name=&quot;cool_fifo@$${domain}&quot;
importance=&quot;0&quot;&gt;<br>
<br>
&nbsp; &nbsp; &nbsp;&lt;member timeout=&quot;30&quot; simo=&quot;1&quot;
lag=&quot;5&quot;&gt;<br>
{member_wait=nowait,ignore_early_media=true}sofia/internal/1??????7701@192.1<br>
68.3.11:5060&lt;/member&gt;<br>
<br>
&nbsp; &nbsp; &nbsp;&lt;member timeout=&quot;30&quot; simo=&quot;1&quot;
lag=&quot;5&quot;&gt;<br>
{member_wait=nowait,ignore_early_media=true}sofia/internal/1??????7693@192.1<br>
68.3.11:5060&lt;/member&gt;<br>
<br>
&nbsp; &nbsp; &nbsp;&lt;member timeout=&quot;30&quot; simo=&quot;1&quot;
lag=&quot;5&quot;&gt;<br>
{member_wait=nowait,ignore_early_media=true}sofia/internal/1??????7698@192.1<br>
68.3.11:5060&lt;/member&gt;<br>
<br>
&nbsp; &nbsp;&lt;/fifo&gt;<br>
&nbsp;&lt;/fifos&gt;<br>
&lt;/configuration&gt;<br>
<br>
----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----<br>
<br>
&lt;include&gt;<br>
&nbsp;&lt;context name=&quot;pbx_test&quot;&gt;<br>
<br>
&nbsp; &nbsp;&lt;extension name=&quot;test1&quot;&gt;<br>
&nbsp; &nbsp; &nbsp;&lt;condition field=&quot;${freetdm_span_name}&quot;
expression=&quot;^span_fxo_test$&quot;&gt;<br>
&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application=&quot;answer&quot;/&gt;<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp;&lt;!-- Detect busy tone from Panasonic --&gt;<br>
&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application=&quot;tone_detect&quot;
data=&quot;busy 350,440 r 0 hangup 4&quot;/&gt;<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application=&quot;playback&quot;<br>
data=&quot;ivr/ivr-hold_connect_call.wav&quot;/&gt;<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application=&quot;fifo&quot;
data=&quot;cool_fifo@$${domain} in&quot;/&gt;<br>
<br>
&nbsp; &nbsp; &nbsp;&lt;/condition&gt;<br>
&nbsp; &nbsp;&lt;/extension&gt;<br>
&nbsp;&lt;/context&gt;<br>
&lt;/include&gt;<br>
<br>
----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----<br>
<br>
Cheers,<br>
-Slim<br>
--<br>
Jeroen C. &quot;Slim&quot; van Gelderen<br>
<br>
<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a
href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>