How to Play Background Ambient Sound in Stasis App Without Blocking Call?

Hi everyone,

I am running a Stasis application for a voicebot using Asterisk ARI and Node.js. Everything is working well—the bot answers calls, processes speech, and responds in real-time.

Now, I want to add background ambient sound (e.g., office noise) while the conversation is ongoing to make it sound more natural.

Issue:
I tried playing the sound using Playback() on the same channel, but it blocks further execution until the sound completes. This causes the bot to get stuck until the background sound finishes, which is not the intended behavior.

What I Tried:

  1. Playing sound in the same channel
    • Used channel.play({ media: "sound:office-background" }) → This blocks the conversation.
  2. Playing sound in a bridge
    • Added the main caller and played audio inside the bridge.
    • Still, the bot’s speech processing was delayed.
  3. Using a Local channel to play the sound
    • Created a Local/5001 extension that plays the sound and added it to the bridge.
    • It works but causes high voice queue warnings (Exceptionally long voice queue length (97 voice / 100 total)).

Question:
Is there a better way to continuously play background sound without interfering with the ongoing conversation?

Any suggestions or best practices for handling this in ARI?

Thanks in advance! :rocket:

Snoop channels maybe, or bridges. You haven’t actually stated how it’s all connected now so it’s hard to say.

@jcolp so in our voicebot, we have one bridge which plays all the sound which we send from TTS to call and we have another snoop channel which works with RTP Server to listen the STT and another snoopChannel which records the call this is the current flow of the asterisk ARI.
Now I have to implement background sound as I tried with snoopChannel but I can’t listen it.