We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asterisk 18.0.0 go version go1.15.6
it's a play file but don't make h.Hangup() ??
`func app(ctx context.Context, h *ari.ChannelHandle) { defer h.Hangup()
ctx, cancel := context.WithCancel(ctx) defer cancel() log.Info("Running app", "channel", h.ID()) end := h.Subscribe(ari.Events.StasisEnd) defer end.Cancel() // End the app when the channel goes away go func() { <-end.Events() cancel() }() if err := h.Answer(); err != nil { log.Error("failed to answer call", "error", err) return } if err := play.Play(ctx, h, play.URI("sound:tt-monkeys")).Err(); err != nil { log.Error("failed to play sound", "error", err) return } log.Info("completed playback") // end.Cancel() h.Hangup() return
}`
The text was updated successfully, but these errors were encountered:
Did you find any solution? @remotejob
Sorry, something went wrong.
No branches or pull requests
Asterisk 18.0.0
go version go1.15.6
it's a play file but don't make h.Hangup() ??
`func app(ctx context.Context, h *ari.ChannelHandle) {
defer h.Hangup()
}`
The text was updated successfully, but these errors were encountered: