<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.EmailStyle17
        {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;}
-->
</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'>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><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>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>