1

I'm trying to figure out a way to enable TALK_DETECT for an outgoing channel, but this does not seem possible for channel which his originated via ARI.

I thought about using a pre-dial handler for this, but it only seems possible when using the dialplan's Dial() function, not when originating with ARI endpoint.

I can't use a Local channel and direct the flow via a dialplan context, because due to asterisk's stupid architecture it causes all sorts of issues for me, so I'm pretty much locked out of using a dialplan.

Any ideas please?

Mickaël Leger
  • 3,426
  • 2
  • 17
  • 36
Nicolas
  • 1,256
  • 1
  • 10
  • 22

3 Answers3

1

Managed to enable TALK_DETECT using the /channels/{channelId}/variable endpoint. It does not behave as expected though, which leads me to suspect it is listening on the transmitting side instead of the receiving one.

Nicolas
  • 1,256
  • 1
  • 10
  • 22
  • This is what I do for talk detection - how did you plan to use talk detection otherwise? As far as I understand the `TALK_DETECT` logic listens to both sides of the channel. – Guss Mar 09 '21 at 12:36
  • Correction: according to https://github.com/asterisk/asterisk/blob/773f424c7f7d54a8fa585deaa815cacdf1557e2b/funcs/func_talkdetect.c#L171 , `TALK_DETECT` only works on the remote side of the channel - i.e. an outgoing channel it would be the receiver. – Guss Mar 09 '21 at 13:03
0

I haven't gotten a chance to use ARI much, but have you tried the record endpoint? You can tell it to record for a maxSilenceDuration and it will return the talking_duration. You could use this to poll in a loop while you do something else.

QuickDanger
  • 1,032
  • 11
  • 18
0

Just add the TALK_DETECT variable when creating the channel by ARI. That should do it.