Hi All - I am fairly new to Asterisk and have been writing an EAGI script that pushes audio from a channel into a .wav file for recording purposes. I currently have this script working but have a problem where the EAGI fails after the call is bridged. I have tried a few different solutions and none of them are currently working - here have been my attempts.
- Working on 2 independent channels before Bridging
- User calls toll-free trunk number
- Extension rings softphone
- Two copies of the EAGI run independently but channels have not been bridged so users can’t hear one another
- Applying Async AGI to each Channel
- I’ve tried using Async AGI to invoke the EAGI script after the bridge but from what I can tell once the channels are bridge the Async AGI nolonger works on the channels until they exit the bridge
- Apply ChanSpy to an individual channel after the calls are bridge, duplicating the audio on a new channel
- Basically I create a duplicate channel that taps into one of the bridged channels and try to execute the EAGI script on that new channel
- This also fails as soon as the ChanSpy is initiated
My manager frustration here is with Bridging… from what I can understand the EAGI scripts and Async AGI (using AMI) work perfectly when the channels are NOT bridged but the second the channels are bridged they are unresponsive or exit the existing EAGI call that is running. So my main question here is:
- How can you bridge two channels without exiting the Async AGI on each channel
- How can you connect 2 channels (so they caller and receiver can hear one another) without breaking these channels. I know when you bridge there are /Surrogate channels that are created but from what it looks like you can’t execute commands on these channels themselves.
- When you bridge a call do the original channels that you bridge still remain entirely independent? Is the audio of each speaker isolated to that channel or can you here the other speaker’s audio in each independent channel.
Sorry for all of the questions at one, if someone has some better comprehensive understanding of Asterisk I would appreciate your thoughts. Have spent probably 20 hrs playing around with these different options and from I understand it doesn’t seem like there is any way to run EAGI or Async AGI on channels once they have been bridged - bridging basically kills functionality to an individual channel.