<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:st1="urn:schemas-microsoft-com:office:smarttags" 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]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @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;}
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'>Here&#8217;s a snippet of what I use with
tone_detect, although I don&#8217;t actually look for a ring signal:<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=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp; &lt;extension
name=&quot;ivr_start&quot;&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp; &lt;condition
field=&quot;destination_number&quot; expression=&quot;^82(\d{10})$&quot;&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- we
can skip all this early media stuff if the far end answers --&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action
application=&quot;set&quot; data=&quot;execute_on_answer=transfer IVRANSWERCALL
XML default&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action
application=&quot;sleep&quot; data=&quot;100&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action
application=&quot;pre_answer&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;!--&lt;action application=&quot;record_session&quot;
data=&quot;/mnt/powervault/Databases/XMLCDR/${uuid}__1.wav&quot;/&gt;--&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action
application=&quot;sleep&quot; data=&quot;500&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- If
call gets here then probably we're in progress media; get ready to handle
various tones --&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--
Look for busy and SIT tones right away, then wait a bit before looking for a
ring signal --&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action
application=&quot;tone_detect&quot; data=&quot;BUSY 480,620 r +25000 set
BUSY=true&quot;/&gt;&nbsp; &lt;!-- detect busy --&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action
application=&quot;tone_detect&quot; data=&quot;SIT1LO 913.8 r +25000 set
SIT1LO=true&quot;/&gt;&nbsp;&nbsp; &lt;!--1st segment low --&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action
application=&quot;tone_detect&quot; data=&quot;SIT1HI 985.2 r +25000 set
SIT1HI=true&quot;/&gt;&nbsp;&nbsp; &lt;!--1st segment high --&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action
application=&quot;tone_detect&quot; data=&quot;SIT2LO 1370.6 r +25000 set
SIT2LO=true&quot;/&gt;&nbsp;&nbsp; &lt;!--2nd segment low --&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action
application=&quot;tone_detect&quot; data=&quot;SIT2HI 1428.5 r +25000 set
SIT2HI=true&quot;/&gt;&nbsp;&nbsp; &lt;!--2nd segment high --&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action
application=&quot;tone_detect&quot; data=&quot;SIT3LO 1776.7 r +25000 set
SIT3LO=true&quot;/&gt;&nbsp; &lt;!--3rd segment low --&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action
application=&quot;tone_detect&quot; data=&quot;SITITU1 950 r +25000 set
SITITU1=true&quot;/&gt;&nbsp;&nbsp; &lt;!--2nd segment low --&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action
application=&quot;tone_detect&quot; data=&quot;SITITU2 1400 r +25000 set
SITITU2=true&quot;/&gt;&nbsp;&nbsp; &lt;!--2nd segment high --&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action
application=&quot;tone_detect&quot; data=&quot;SITITU3 1800 r +25000 set
SITITU3=true&quot;/&gt;&nbsp; &lt;!--3rd segment low --&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action
application=&quot;set&quot; data=&quot;ivr_result=unknown&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action
application=&quot;sleep&quot; data=&quot;25010&quot;/&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;action
application=&quot;lua&quot; data=&quot;check_sit.lua&quot;/&gt; &lt;!-- Check
for SIT or BUSY flags --&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- if
we make it all the way here then it's a pretty good chance that it is a real no
answer --&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action
application=&quot;transfer&quot; data=&quot;IVRNOANS XML default&quot;/&gt;<o:p></o:p></span></font></p>

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

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&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'>If you added something like this:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&lt;action
application=&quot;tone_detect&quot; data=&quot;RING 440,480 r +25000 set RING=true&quot;/&gt;&nbsp;
&lt;!-- detect ring --&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'>Then you&#8217;d be able to detect
ringing, assuming these frequencies match your country&#8217;s ring
frequencies.<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'>-MC<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>

<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>

<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>Anthony Minessale<br>
<b><span style='font-weight:bold'>Sent:</span></b> Tuesday, September 02, 2008
3:35 PM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">freeswitch-users@lists.freeswitch.org</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Freeswitch-users]
Openzap: Analog FXO disconnect supervision.Is it possible to disconnect on
busy? is battery reversal thedefault? is it power denial?</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>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>you just put the
tone_detect app right before the bridge app<br>
you might have to also execute pre_answer to get an early media stream up into
FS<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 Tue, Sep 2, 2008 at 5:23 PM, Luis F Urrea &lt;<a
href="mailto:lfurrea@gmail.com">lfurrea@gmail.com</a>&gt; wrote:<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Anthony,<br>
<br>
So far I haven't been able to used the tone_detect app with hangup when it
involves a phone ringing, Could you provide an example of a dialplan rule that
I could test. <br>
<br>
TIA<o:p></o:p></span></font></p>

<div>

<div>

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

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>On Tue, Sep 2, 2008 at 4:18 PM, Luis F Urrea &lt;<a
href="mailto:lfurrea@gmail.com" target="_blank">lfurrea@gmail.com</a>&gt;
wrote:<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>I understand that tone based disconnect could be subject to false
disconnects in some cases, being dependent&nbsp; on the integrity of the analog
signal and the proper configuration of tones, however I do feel that the
feature is worth the effort, considering how difficult it is to get a Telco to
arrange changes of settings on analog lines and being a last resort for this
kind of situation. <br>
<br>
I do know however that this feature is implemented for example on Cisco IOS for
analog gateways, Audiocodes gateways and Patton gateways. <br>
<br>
Cisco IOS and Patton requires one to specify the frequencies and cadence of the
tone, Audiocodes provides an application that records the call progress tones
and then analyzes the recorded busy signal to be used as the disconnect signal.<br>
<br>
I used to work at Cisco TAC supporting H323 analog and digital gateways, and in
my experience the feature certainly saved the day in many cases after the
customer was frustrated in trying to find out what his/her provider implemented
on the line.<br>
<br>
My vote goes for it!<o:p></o:p></span></font></p>

<div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
<br>
<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 Tue, Sep 2, 2008 at 1:05 PM, Michael Jerris &lt;<a
href="mailto:mike@jerris.com" target="_blank">mike@jerris.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'>We do have the following patch almost ready to merge:<br>
<br>
<a href="http://jira.freeswitch.org/browse/OPENZAP-3" target="_blank">http://jira.freeswitch.org/browse/OPENZAP-3</a><br>
<br>
it could probably be expanded to work for other tones than dtmf, with<br>
the caveats described by tony.<br>
<br>
Mike<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
On Sep 2, 2008, at 2:22 PM, Anthony Minessale wrote:<br>
<br>
&gt; Any method besides the tone based ones are supported by whichever IO<br>
&gt; layer you choose.<br>
&gt; For instance if you are using the zt mod (zaptel) then all the low<br>
&gt; level analog signalling will be generated by zaptel for ground loop<br>
&gt; and kewl start etc.<br>
&gt;<br>
&gt; Tone based hangup detection is a higher level concept that could be<br>
&gt; implemented in the core of openzap but would require constant tone<br>
&gt; detection throughout the call and is susceptible to false positives<br>
&gt; etc.<br>
&gt;<br>
&gt; it's not a common feature where I wrote the code from. &nbsp;I have<br>
&gt; kewlstart lines here and nobody has asked for it and I don't have a<br>
&gt; labbed up example and I only have 2 hands therefore it's not<br>
&gt; implemented.<br>
&gt;<br>
&gt; Like I said using tone_detect in FreeSWITCH with action hangup is<br>
&gt; not any more or less glorious than how the feature would work right<br>
&gt; in openzap so you can use it that way if you want.<br>
&gt;<br>
<br>
<o:p></o:p></span></font></p>

</div>

<div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">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>

</div>

</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>

</div>

</div>

</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>

</div>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><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'><br>
<br clear=all>
<br>
-- <br>
Anthony Minessale II<br>
<br>
FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>
AIM: anthm<br>
<a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br>
<br>
FreeSWITCH Developer Conference<br>
<a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
<a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:213-799-1400<o:p></o:p></span></font></p>

</div>

</div>

</div>

</body>

</html>