Hey Guys,
I have a stasis app written with aioari that has the primary purpose of opening an external media channel to an application I’ve developed, along with some basic channel and bridge handling.
I’ve come to a point in my application in which I need to implement an attended transfer, which looks like the following:
- mute and play hold music on originating channel via ARI
- originate new call and a completely new bridge via my PBX to answering agent with another distinct external media channel to relay info
- close the secondary call on response
- redirect originating call to the agent’s address
However, when closing the secondary call, not only does the secondary call receive a StasisEnd event, but so does the originating call. This terminates each leg and kills the call.
I’ve tried changing the StasisEnd handler within my app to do nothing, I’ve tried sidestepping the ARI hangup endpoint to end the secondary call, I’ve logged every event in my stasis app and am still unable to determine why the originating channel also receives the StasisEnd event.
Has anyone come across this issue before?