[asterisk-dev] [Code Review] 3563: TALK_DETECT: A channel function that raises AMI/ARI events when talking is detected

Joshua Colp reviewboard at asterisk.org
Thu May 29 09:43:11 CDT 2014



> On May 29, 2014, 1:53 p.m., Joshua Colp wrote:
> > How do you foresee this being invoked for ARI? the existing channel variable stuff?
> 
> Matt Jordan wrote:
>     Yup. Enabling an event to be emitted on a channel didn't feel worthy of a full operation on the channels resource - and implementing this as a function makes it useful for ARI, AMI, AGI, and the dialplan without causing undo restrictions in the interfaces.

Agreed, I'm just pondering how that looks to an outsider user via ARI. I'm meh about it.


> On May 29, 2014, 1:53 p.m., Joshua Colp wrote:
> > /branches/12/funcs/func_talkdetect.c, line 70
> > <https://reviewboard.asterisk.org/r/3563/diff/1/?file=58936#file58936line70>
> >
> >     It may be worthwhile adding some information about using this with the AGC and DENOISE dialplan functions.
> 
> Matt Jordan wrote:
>     Hm. How do you see this being used with those (apart from using AGC/DENOISE to 'clean up' the audio stream?)

That's exactly how I foresee it being used but giving an example to ensure the correct order yields that result would head off a case in the future of something trying it and not having it work (because they did TALK_DETECT before AGC/DENOISE). Examples are good.


- Joshua


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3563/#review11995
-----------------------------------------------------------


On May 25, 2014, 4:47 a.m., Matt Jordan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3563/
> -----------------------------------------------------------
> 
> (Updated May 25, 2014, 4:47 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-23786
>     https://issues.asterisk.org/jira/browse/ASTERISK-23786
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This patch adds a new channel function TALK_DETECT that, when set on a channel, causes events indicating the start/stop of talking on a channel to be emitted to both AMI and ARI clients. Why a channel function? Because both ARI and AMI can set it on the channel, making it (slightly) more useful than existing speech/silence detection dialplan applications.
> 
> The function allows setting both the silence threshold (the length of silence after which we decide no one is talking) as well as the talking threshold (the amount of energy that counts as talking):
> 
> same => n,Set(TALK_DETECT(set)=2500,256)
> 
> Parameters can be updated on a channel:
> 
> same => n,Set(TALK_DETECT(set)=)       ; Enable talk detection
> same => n,Set(TALK_DETECT(set)=,128)   ; Set the talking threshold on the existing talk detection to 128
> 
> And talk detection can be removed:
> 
> same => n,Set(TALK_DETECT(remove)=)
> 
> The events raised by the function use a nomenclature similar to existing AMI/ARI events.
> For AMI: ChannelTalkingStart/ChannelTalkingStop
> For ARI: ChannelTalkingStarted/ChannelTalkingFinished
> 
> Both 'end' events include the duration of talking that was detected (in milliseconds).
> 
> 
> Diffs
> -----
> 
>   /branches/12/rest-api/api-docs/events.json 414470 
>   /branches/12/res/ari/ari_model_validators.c 414470 
>   /branches/12/res/ari/ari_model_validators.h 414470 
>   /branches/12/main/stasis_channels.c 414470 
>   /branches/12/main/audiohook.c 414470 
>   /branches/12/include/asterisk/stasis_channels.h 414470 
>   /branches/12/funcs/func_talkdetect.c PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/3563/diff/
> 
> 
> Testing
> -------
> 
> See review https://reviewboard.asterisk.org/r/3564
> 
> 
> Thanks,
> 
> Matt Jordan
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140529/25baf7d2/attachment.html>


More information about the asterisk-dev mailing list