<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:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>

<meta name=Generator content="Microsoft Word 12 (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:Courier;
        panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
        {font-family:Courier;
        panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 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:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EstiloCorreo17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=ES-MX link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Please correct me if I&#8217;m wrong.  <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>The events are indeed fired, but only if the
SWITCH_VAD_FLAG_EVENTS_TALK or NOTALK flags are set for an rtp_session.   I
found no place in the code where those flags are set.  That is what I meant by
not  being &#8220;enabled&#8221;.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I subscribed to the events and received nothing.  Then I set the
flags on switch_rtp_enable_vad function, and then I started receiving the
events.  Perhaps there is another way of doing it that I&#8217;m missing.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Cesar Cepeda.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

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

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=ES style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De:</span></b><span
lang=ES style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
freeswitch-dev-bounces@lists.freeswitch.org
[mailto:freeswitch-dev-bounces@lists.freeswitch.org] <b>En nombre de </b>Anthony
Minessale<br>
<b>Enviado el:</b> Miércoles, 13 de Febrero de 2008 08:17<br>
<b>Para:</b> freeswitch-dev@lists.freeswitch.org<br>
<b>Asunto:</b> Re: [Freeswitch-dev] VAD, TALK and NOTALK events<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-family:Courier'>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>
<o:p></o:p></span></p>

<div>

<p class=MsoNormal><span style='font-family:Courier'>&nbsp;<o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='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></p>

</div>

<div>

<p class=MsoNormal><span style='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></p>

</div>

<div>

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

<div>

<p class=MsoNormal>----- Original Message ----<br>
From: Cesar Cepeda &lt;cesar@auronix.com&gt;<br>
To: freeswitch-dev@lists.freeswitch.org<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">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></p>

</div>

<p class=MsoNormal><span style='font-family:Courier'><o:p>&nbsp;</o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<div class=MsoNormal align=center style='text-align:center'>

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

</div>

<p class=MsoNormal>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></p>

</div>

</div>

</body>

</html>