[Home]

Summary:ASTERISK-23786: TALK_DETECT: A dialplan function that emits talking start/stop events for AMI/ARI
Reporter:Matt Jordan (mjordan)Labels:
Date Opened:2014-05-24 23:45:33Date Closed:2014-05-30 07:40:55
Priority:MajorRegression?No
Status:Closed/CompleteComponents:
Versions:12.2.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) ASTERISK-23786-12.diff
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):

{code}
same => n,Set(TALK_DETECT(set)=2500,256)
{code}

Parameters can be updated on a channel:

{code}
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
{code}

And talk detection can be removed:

{code}
same => n,Set(TALK_DETECT(remove)=)
{code}

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).
Comments: