How to play background music while call?

after connected call, to end call, one music should be play whole time.

the music should be Call Center Sounds - Work From Home - Office - Ambience - YouTube.

this is possible?

Yes…but I know what you want to do. You want that to play in the background on a loop so your callers think you’re in a busy office.

I won’t get in to the ethical implications of that…but I don’t think you’ll be able to accomplish it in a believable way. Off the top of my head…you could conference both calls together. The problem is they’d likely enter the bridge and hear the sound before you pickup.

I don’t know if there’s a way to mix within Asterisk. Your alternative is to use a softphone and some software to mix the audio on your PC.

I was also looking for something like this because I have some phone bots (like Lenny) that answer the calls to scammers, and I want a constant noise in the background, like a TV playing or sth.

I think we could achieve this with chanspy, by “whispering” to the call with an extension that plays music.

I haven’t tried it yet though.

Don’t think it can be done, purely with Asterisk.

I also have a hard time seeing what you want to archive, by adding noise to the call. Whenever I call a company that has a noisy callcenter, I waste a lot of time asking to get things repeated, and if the company does not even bother providing a quiet environment in their call center, where else do they cut costs? (In most cases noise dampening walls between people, and enough spacing will get you far)

If you absolutely must, I believe you get the audio passed along to EAGI scripts, and you might be able to use an EAGI application to dial whatever you’re trying to dial, then in the EAGI application mix the audio together with your noise track, and pass it on to the client. I’ve never really looked much in to EAGI, as I’ve never had a need for the raw audio in my AGI applications.

You can do this using ARI
By putting both callers into bridge and use play api to play any sound file any time into the bridge

Don’t think it can be done, purely with Asterisk.

It certainly can be. Use ConfBridge or ChanSpy to do this. I do this in a number of applications.

No need for ARI either.

Seems to me this would cause audio to play before the person answers.

Seems to me this would cause audio to play before the person answers.

Not sure which suggestion this is a reply to, but inherently I don’t think this has any impact on supervision.

ConfBridge can be set to not answer and ChanSpy does not impact supervision on the target channel.

Unsupervised audio is not an issue either, as long as there is a Progress() to get media flowing.

How exactly would you construct the flow?

How exactly would you construct the flow?

Flow for what? It really depends on the specific example or use case.

Generally speaking though, you can Originate two Local channels, one that plays the background audio, and the other that calls ChanSpy with the barge option to inject the audio into the original channel, and will hang up once that channel disappears.

The only downside with ChanSpy is it uses audiohooks and is thus subject to the bug of not working when there isn’t media flow on the channel: [ASTERISK-24397] Audiohooks require constant media flow for whispering - Digium/Asterisk JIRA

In practice, I’ve found this is only an issue when Dial() is executing and the remote end is slow to respond to the incoming call.

thanks for your reply.
how can do this?
you can guide me a little more?

I checked.
but this is not solved.

Unless you understand what that issue is talking about, it’s unlikely to be an issue for you.

That’s more a caveat rather than a problem with the approach.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.