Summary:ASTERISK-02121: [request] Add ast_dsp to generate manager events for talk/silence.
Reporter:lesnet (lesnet)Labels:
Date Opened:2004-07-27 11:51:36Date Closed:2011-06-07 14:05:22
Versions:Frequency of
Environment:Attachments:( 0) app_meetme_dsp_2.txt
( 1) app_meetme_dsp.txt
Description:Add ast_dsp to each member of a meetme conference.  

Be able to provide a silence millisecond count, and threshold via channel variable to ast_dsp.

Have it generate a single manager_event when a user starts talking, and a single manager_event when the user stops talking.  
ie: MeetmeSilent,  MeetmeTalking


I've added ast_dsp to my local version of app_meetme, and it has been *extremely* valuable when used in conjunction with a desktop GUI to detect precisely who is talking (or making noises/background noises).   An essential conference moderation requirement.

( I'm not a C programmer, but can provide code snippets of how I achieved this modification )
Comments:By: twisted (twisted) 2004-07-27 12:23:05

Just out of curiosity, if you have this working, and would like to see it in, why not file a disclaimer if you haven't already, and post a patch?

By: twisted (twisted) 2004-07-27 12:25:16

the reason i'm asking, is that there are a lot of uses for this, and it would be great to have in the codebase.  I'm definately interested in this as well... Can we have a patch? :P

By: lesnet (lesnet) 2004-07-27 12:42:27

Well, I'm no 'C' programmer.  I managed to make it work via copy/paste and a bit of goofing around.  My app_meetme is totally poluted with my modifications, so I cannot produce a nice diff of the files.

However, I'll attach the copy/paste stuff needed to insert it.   I'm sure someone who's C skills exceed my own might want to clean it up.

I'll look into the disclaimer next, but for all it's worth, to anyone, do what you like with these code snippets, I place them in the public domain for anyone to do anything with, as its mostly copy/paste from app_record.c

By: twisted (twisted) 2004-07-27 12:44:09

This is a start, but I'm not seeing where in meetme you injected these 'snippets'..

By: lesnet (lesnet) 2004-07-27 12:44:48

One thing to realize is that ast_dsp is not free'd anywhere in my code.  Could not figure out where to put that (or didn't bother to, one or the other).  Should probably add that in there too.

By: lesnet (lesnet) 2004-07-27 12:49:36

Sorry, I'm a newb.  I'll re-upload with some approximate line numbers or things you can search for to inject the code.

ALSO: I actually have two ast_dsp's in my code.  One detects talking, and reports events, and is not too sensitive threshold(256/750);

The second ast_dsp is set to threshold(32/250);  this picks up way more 'noise'.  I use the first ast_dsp to report on talking/silents.   And I use the second sensitive ast_dsp to detect total silence.  

What happens, is people put their phones on mute, or flip over to a 3way/callwaiting, and forget to come back.  So if I detect TOTAL silence for 15 minutes, I hangup on them.  Now, this has to be done with two ast_dsps, because sometimes, a user WILL participate in a conference, but wont break the talk/threshold entirely, but WILL break the 32/250 noise ratio.  (ie: someone responds with "yes" or "no", or "ah hah" or simply giggles, all these responses are under 750ms.  (may sound weird, but, after 20,000 calls to the public conference, it is a *tremendous* help using two of them with different sensitivities.)

By: twisted (twisted) 2004-08-19 23:55:41

If we can't get a diff on this, then I'm gonna have to close it.   It's a good idea, but a nice solid patch needs to be sumbitted.  If you feel you're up to submitting a diff -u on your modifications, feel free to re-open, submit disclaimer if you haven't already, and submit the patch.

Thanks ;)