- Joined
- Mar 25, 2019
- Messages
- 15
- Reaction score
- 2
We are developing a Voice Agent application running on 3CX using XAPI, and we’ve encountered an issue that is not addressed in the documentation.
Specifically, we are using the endpoint /callcontrol/{dnnumber}/participants/{id}/stream to stream audio to a participant. The audio playback works as expected; however, once audio streaming has started, we are unable to interrupt or stop the playback when an interruption occurs.
For example, if the AI Agent generates a 5-second audio response and we stream this to the participant, but the participant asks a new question at the 3-second mark, we need to immediately stop the currently playing audio. Unfortunately, there is no API endpoint that allows us to cancel or interrupt an ongoing audio stream.
We attempted a workaround by sending a 2–3-second silent audio chunk while the original audio was still playing, but this does not stop the existing audio. Instead, it is simply appended to the end of the current playback queue.
We would appreciate your guidance on whether there is a recommended solution or an undocumented method to interrupt or cancel an audio stream in this scenario.
Thank you in advance for your support.
Specifically, we are using the endpoint /callcontrol/{dnnumber}/participants/{id}/stream to stream audio to a participant. The audio playback works as expected; however, once audio streaming has started, we are unable to interrupt or stop the playback when an interruption occurs.
For example, if the AI Agent generates a 5-second audio response and we stream this to the participant, but the participant asks a new question at the 3-second mark, we need to immediately stop the currently playing audio. Unfortunately, there is no API endpoint that allows us to cancel or interrupt an ongoing audio stream.
We attempted a workaround by sending a 2–3-second silent audio chunk while the original audio was still playing, but this does not stop the existing audio. Instead, it is simply appended to the end of the current playback queue.
We would appreciate your guidance on whether there is a recommended solution or an undocumented method to interrupt or cancel an audio stream in this scenario.
Thank you in advance for your support.