Hello - we have a situation where our users connect via computer or phone to an extension in our dialplan.
That extension simply does an Answer, then uses ConfBridge to place them into a conference.
We have the Asterisk Manager Interface hooked up in our code, and we send messages like ConfBridgeMute, etc. and that works great.
We have need of playing audio files to users that are connected and are in ConfBridge.
A great example of this is an audio file that says “You have been muted by the conference leader” (we added an admin level mute into our app). Or if the user on the phone hits *51 to unmute, but we detect that they are “admin muted” we want to play an audio file that says “Sorry, you can’t unmute because the conference leader has muted you”.
I’ve been trying various things but no luck so far. It appears that AGI will be the best bet, but I think I’m not understanding a key component of this.
I attempted to added Async AGI support to the channels like this (which is apparently all wrong haha)
exten => 1,1,AGI(agi:async)
same => n,Answer
same => n,ConfBridge( with all its params )
same => n,Hangup
I was hoping that would enable async agi on the channel that gets established and then I could issue commands via AGI to play the sound whenever my app decides it should.
However I notice than when AGI(agi:async) is called in the dial plan, execution of the remaining priorities in the extension doesn’t happen. It seems as if that dial plan cmd puts the extension into listen mode… so my user never gets into ConfBridge.
This makes it pretty obvious I don’t quite understand AGI.
In a nutshell… I want users coming in via my dialplan and getting to ConfBridge. Then whenever I want, using AMI from my own application… I like to be able to play an audio file on any of the existing channels that are on the call.
Any thoughts to get me back on the right track?