Closed gordongrech closed 6 months ago
You cannot play a different audio file to a channel (or bridge) while another is playing (paused or not). I would:
That said, there is also the Asterisk-native MusicOnHold feature, which is accessible as player.MOH()
and player.StopMOH()
(player here refers to a channel handle or a bridge handle), which would be the more usual way of doing this.
Hello, I am building a distributed queue app. Part of the app is paying music and periodic announcements while the call is queued. I would need the music to stop, announcement plays and music resumes from where it stopped.
I have tried achieving this using pause on music, playing the announcement and unpausing the musing again, but I get an error "failure in playback: timeout waiting for playback to start" whenever I play the announcement.
Another approach is to keep track of music playback duration and re-start music playback at an offset. I went through the documentation and issues to find a way to use something like playback with offsetMs however I cant seem to find the option available in the API.
Can anyone please guide me in the right direction if I am missing something?
Thanks