<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<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 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="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<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:Courier;
        panose-1:2 7 4 9 2 2 5 2 4 4;}
@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'>Anthony,<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'>That begs the question &#8211; do we have VAD
(or AMD or FMD) on other endpoints?  Specifically I&#8217;d be interested in knowing
about OpenZAP.  Can it or is there any kind of machine detection or human
detection (like Asterisk&#8217;s AMD app) for OZ or any other endpoints capable of
dialing an outbound call?<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'>Thanks,<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-dev-bounces@lists.freeswitch.org
[mailto:freeswitch-dev-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> Friday, February 15, 2008
6:09 AM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">freeswitch-dev@lists.freeswitch.org</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Freeswitch-dev] VAD,
TALK and NOTALK events</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=Courier><span
style='font-size:12.0pt;font-family:Courier'>The algorithm used is not so great
and could stand to be replaced<br>
by a better one if we get the chance.<br>
<br>
basically we decode the audio to signed linear 16bit samples<br>
for each packet we receive and iterate the samples and add up the<br>
absolute values then compute the average and compare it to the <br>
acceptable level considered &quot;talking&quot; then we use a counter to make<br>
sure it's in the same state several times in a row before actually<br>
changing the status of the channel to talking or not talking.<br>
<br>
<br>
A real vad algorithm would also be able to filter out the voice from<br>
the background noise and judge the energy based only on that.<br>
<br>
<br>
<br>
<br>
<br>
<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'>Anthony Minessale II<br>
<br>
FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
<br>
AIM: anthm<br>
MSN:anthony_minessale@hotmail.com<br>
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<br>
IRC: irc.freenode.net #freeswitch<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'><br>
FreeSWITCH Developer Conference<br>
sip:888@conference.freeswitch.org<br>
iax:guest@conference.freeswitch.org/888<br>
googletalk:conf+888@conference.freeswitch.org<br>
pstn:213-799-1400<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3 face=Courier><span
style='font-size:12.0pt;font-family:Courier'><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'>----- Original Message ----<br>
From: KMTDBOURSE &lt;kmtdbourse@free.fr&gt;<br>
To: <st1:PersonName w:st="on">freeswitch-dev@lists.freeswitch.org</st1:PersonName><br>
Sent: Thursday, February 14, 2008 1:51:55 PM<br>
Subject: Re: [Freeswitch-dev] VAD, TALK and NOTALK events<br>
<br>
<font color=blue><span style='color:blue'>Hi,<br>
<br>
&nbsp;&nbsp; I ma interested in the VAD algorithm used where where is the code
exactly? maybe a link any document support about the vad alogorithm used
therein?<br>
&nbsp;&nbsp; <br>
&nbsp;&nbsp; thanks,<br>
<br>
<br>
Zelda<br>
&nbsp;<br>
<br>
</span></font>At 01:47 14/02/2008, Anthony Minessale wrote:<br>
<br>
<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>They are enabled by the vad params in the <st1:City w:st="on"><st1:place
 w:st="on">sofia</st1:place></st1:City> profile xml<br>
&lt;param name=&quot;vad&quot;&gt;<br>
<br>
&nbsp;<br>
Anthony Minessale II<br>
<br>
FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
<br>
AIM: anthm<br>
MSN:anthony_minessale@hotmail.com<br>
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a>
#freeswitch<br>
<br>
FreeSWITCH Developer Conference<br>
sip:888@conference.freeswitch.org<br>
iax:guest@conference.freeswitch.org/888<br>
googletalk:conf+888@conference.freeswitch.org<br>
pstn:213-799-1400<br>
<br>
<br>
----- Original Message ----<br>
From: Cesar Cepeda &lt;cesar@auronix.com&gt;<br>
To: <st1:PersonName w:st="on">freeswitch-dev@lists.freeswitch.org</st1:PersonName><br>
Sent: Wednesday, February 13, 2008 10:17:23 AM<br>
Subject: Re: [Freeswitch-dev] VAD, TALK and NOTALK events<br>
<br>
Please correct me if I&#8217;m wrong.&nbsp; <br>
<br>
&nbsp;<br>
<br>
The events are indeed fired, but only if the SWITCH_VAD_FLAG_EVENTS_TALK or
NOTALK flags are set for an rtp_session.&nbsp;&nbsp; I found no place in the
code where those flags are set.&nbsp; That is what I meant by not&nbsp; being
&#8220;enabled&#8221;.<br>
<br>
&nbsp;<br>
<br>
I subscribed to the events and received nothing.&nbsp; Then I set the flags on
switch_rtp_enable_vad function, and then I started receiving the events.&nbsp;
Perhaps there is another way of doing it that I&#8217;m missing.<br>
<br>
&nbsp;<br>
<br>
Cesar Cepeda.<br>
<br>
&nbsp;<br>
<br>
&nbsp;<br>
<br>
&nbsp;<br>
<br>
<b><span style='font-weight:bold'>De:</span></b>
freeswitch-dev-bounces@lists.freeswitch.org [<a
href="mailto:freeswitch-dev-bounces@lists.freeswitch.org" target="_blank"
ymailto="mailto:freeswitch-dev-bounces@lists.freeswitch.org"> mailto:freeswitch-dev-bounces@lists.freeswitch.org</a>]
<b><span style='font-weight:bold'>En nombre de </span></b>Anthony Minessale<br>
<b><span style='font-weight:bold'>Enviado el:</span></b> Miércoles, 13 de
Febrero de 2008 08:17<br>
<st1:place w:st="on"><b><span style='font-weight:bold'>Para</span></b></st1:place><b><span
style='font-weight:bold'>:</span></b> <st1:PersonName w:st="on">freeswitch-dev@lists.freeswitch.org</st1:PersonName><br>
<b><span style='font-weight:bold'>Asunto:</span></b> Re: [Freeswitch-dev] VAD,
TALK and NOTALK events<br>
<br>
&nbsp;<br>
<br>
The events are fired.<br>
I don't know what you mean by &quot;enabled&quot;<br>
<br>
You can either bind an event to a callback<br>
in the load function of your custom module.<br>
<br>
or connect to mod_event_socket on tcp<br>
and request &quot;events talk notalk&quot;<br>
<br>
void my_event_handler(switch_event_t *event)<br>
{<br>
<br>
}<br>
<br>
if (switch_event_bind(modname, SWITCH_EVENT_TALK, SWITCH_EVENT_SUBCLASS_ANY,
my_event_handler, NULL)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; != SWITCH_STATUS_SUCCESS) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Couldn't
bind!\n&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return SWITCH_STATUS_GENERR;<br>
&nbsp;&nbsp;&nbsp; }<br>
<br>
if (switch_event_bind(modname, SWITCH_EVENT_NOTALK, SWITCH_EVENT_SUBCLASS_ANY,
my_event_handler, NULL)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; != SWITCH_STATUS_SUCCESS) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Couldn't
bind!\n&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return SWITCH_STATUS_GENERR;<br>
&nbsp;&nbsp;&nbsp; }<br>
<br>
&nbsp;<br>
<br>
Anthony Minessale II<br>
<br>
FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
<br>
AIM: anthm<br>
MSN:anthony_minessale@hotmail.com<br>
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a>
#freeswitch<br>
<br>
<br>
FreeSWITCH Developer Conference<br>
sip:888@conference.freeswitch.org<br>
iax:guest@conference.freeswitch.org/888<br>
googletalk:conf+888@conference.freeswitch.org<br>
pstn:213-799-1400<br>
<br>
&nbsp;<br>
<br>
----- Original Message ----<br>
From: Cesar Cepeda &lt;cesar@auronix.com&gt;<br>
To: <st1:PersonName w:st="on">freeswitch-dev@lists.freeswitch.org</st1:PersonName><br>
Sent: Tuesday, February 12, 2008 6:53:03 PM<br>
Subject: [Freeswitch-dev] VAD, TALK and NOTALK events<br>
<br>
Hi,<br>
<br>
&gt;From looking at the code of switch_rtp.c&nbsp; I can see that VAD is done
if<br>
enabled in the sip profile in order to not send packets when there is no<br>
noise. There are also two events {TALK, NOTALK} which can be fired when VAD<br>
kicks in, nevertheless these two events are enabled nowhere (or at least I<br>
didn't find a place in the code where they were enabled), so no matter if<br>
you ask for them you don't receive them.&nbsp; My questions are the following:<br>
<br>
Is there some particular reason for not enabling these two events?&nbsp; <br>
Is the event queue easily overflowed if these two events are enabled?<br>
<br>
Thanks.<br>
<br>
Cesar Cepeda.<br>
<br>
<br>
_______________________________________________<br>
Freeswitch-dev mailing list<br>
<a href="mailto:Freeswitch-dev@lists.freeswitch.org" target="_blank"
ymailto="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev"
target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev"
target="_blank"> http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
&nbsp;<br>
<br>
&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal align=center style='text-align:center'><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=3 face="Times New Roman"><span style='font-size:
12.0pt'>Never miss a thing. <a
href="http://us.rd.yahoo.com/evt=51438/*http:/www.yahoo.com/r/hs"
target="_blank">Make Yahoo your homepage.</a> <br>
<br>
<br>
-----Inline Attachment Follows-----<br>
<br>
_______________________________________________<br>
Freeswitch-dev mailing list<br>
<a href="mailto:Freeswitch-dev@lists.freeswitch.org" target="_blank"
ymailto="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev"
target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev"
target="_blank"> http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
<br>
Looking for last minute shopping deals? <a
href="http://us.rd.yahoo.com/evt=51734/*http:/tools.search.yahoo.com/newsearch/category.php?category=shopping"
target="_blank">Find them fast with Yahoo! Search.</a> <br>
_______________________________________________<br>
Freeswitch-dev mailing list<br>
Freeswitch-dev@lists.freeswitch.org<br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev"
target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev"
target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><o:p></o:p></span></font></p>

<!-- kill -->

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br>
-----Inline Attachment Follows-----<br>
<br>
_______________________________________________<br>
Freeswitch-dev mailing list<br>
<a href="mailto:Freeswitch-dev@lists.freeswitch.org"
ymailto="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev"
target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev"
target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><o:p></o:p></span></font></p>

</div>

</div>

<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'><o:p>&nbsp;</o:p></span></font></p>

</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 class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

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

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

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Never miss a thing. <a
href="http://us.rd.yahoo.com/evt=51438/*http:/www.yahoo.com/r/hs">Make Yahoo
your homepage.</a> <o:p></o:p></span></font></p>

</div>

</div>

</body>

</html>