I saw that there was a set of dialplan functions here Asterisk 18 Dialplan Functions - Asterisk Project - Asterisk Project Wiki, and I wanted to ask how can i use the speech ones? I managed to use the TALK_DETECT like this
h *ari.ChannelHandle
if err := h.SetVariable("TALK_DETECT(set)", "3000"); err != nil {
log.Error("that variable doesn't exist", "error", err)
return
}
for {
select {
case <-ctx.Done():
log.Info(“Application ended”)
return
case event := <-subscription.Events():
switch event.GetType() {
case ari.Events.ChannelTalkingStarted:
log.Info(“Speech detected on channel:”, “channel”, h.ID())
case ari.Events.ChannelTalkingFinished:
log.Info(“Speech ended on channel:”, “channel”, h.ID())
}
}
}
But I have no idea of how to use the speech ones.