can you submit your patch to jira as an improvement under the "application modules" section please.<br><br><br><div class="gmail_quote">On Wed, Nov 25, 2009 at 12:36 PM, Andrew Fritz <span dir="ltr"><<a href="mailto:afritzlists@fritztech.com">afritzlists@fritztech.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I've created a patch to override the value of MIN_TIME in the vmd modules using a channel variable. In this way, it can be configured on a call by call basis. The channel variable is name "vmd_min_time". I didn't add the other detection parameters, but doing so would be straight forward. So, in our app, we can catch T-Mobile and the other problematic cell carriers beeps.<br>
<br>
I did this because in our app, we would rather have false positives than miss the start of recording on a voice mail system. This way, anyone using the VMD module can configure the vmd module to be as touchy or hard to trigger as they would like.<br>
<br>
I not sure how to implement it (at least in the vmd module code), but a way to make mod_vmd more robust to false positives, especially with short beeps would be to have it look for short silence immediately proceeding and/or following the beep. I've noticed that it tends to trigger on noise if there is tone in the noise, if for example I extend a syllable in a word or I have music on in the background.<br>
<br>
However on a voice mail system there will likely be a short near silence before the tone and an indefinite silence after it. In fact, background noise should be non-existent, except for line noise which should be Gaussian and not look like a structured tone. Looking for a beep + near silence after it for some period should eliminate many false positive where tones are embedded in other sounds (e.g. music or someone holding a vowel for longer than normal).<br>
<font color="#888888">
<br>
Andrew<br>
</font><br>Index: src/mod/applications/mod_vmd/mod_vmd.c<br>
===================================================================<br>
--- src/mod/applications/mod_vmd/mod_vmd.c (revision 15668)<br>
+++ src/mod/applications/mod_vmd/mod_vmd.c (working copy)<br>
@@ -162,6 +162,8 @@<br>
/*! A count of how long a distinct beep was detected<br>
* by the discreet energy separation algorithm. */<br>
switch_size_t timestamp;<br>
+ /*! The MIN_TIME to use for this call */<br>
+ int minTime;<br>
} vmd_session_info_t;<br>
<br>
static switch_bool_t process_data(vmd_session_info_t * vmd_info, switch_frame_t * frame);<br>
@@ -312,7 +314,7 @@<br>
<br>
if (c < (POINTS - MAX_CHIRP)) {<br>
vmd_info->state = BEEP_NOT_DETECTED;<br>
- if (vmd_info->timestamp < MIN_TIME) {<br>
+ if (vmd_info->timestamp < vmd_info->minTime) {<br>
break;<br>
}<br>
<br>
@@ -541,6 +543,7 @@<br>
switch_channel_t *channel;<br>
vmd_session_info_t *vmd_info;<br>
int i;<br>
+ const char *minTimeString;<br>
<br>
if (session == NULL)<br>
return;<br>
@@ -588,6 +591,14 @@<br>
<br>
switch_channel_set_private(channel, "_vmd_", bug);<br>
<br>
+ minTimeString = switch_channel_get_variable(channel, "vmd_min_time");<br>
+ if (minTimeString != 0) {<br>
+ sscanf(minTimeString,"%d",&(vmd_info->minTime));<br>
+ } else {<br>
+ vmd_info->minTime = MIN_TIME;<br>
+ }<br>
+<br>
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "MIN_TIME for call: %d\n",vmd_info->minTime);<br>
}<br>
<br>
/*! \brief Called when the module shuts down<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><br>
<br></blockquote></div><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>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</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<br>