'Keeping b-leg on line after a-leg hangs up

I have a situation where I need to keep the b-leg on the line after the a-leg hangs up so that the b-leg can be presented with an IVR menu. Is this possible to do? Can it be done purely in the dialplan XML or is a different approach, e.g. a Lua script or similar, required? If the latter an example would be helpful.

I have tried using the following channel variables to do this without success:

  • transfer_after_bridge
  • exec_after_bridge_app / exec_after_bridge_arg


Solution 1:[1]

Did you make sure to export the variable to the b-leg?

<action application="export" data="transfer_after_bridge=1000:XML:default"/>

I believe this should work, but I am not 100% sure. I have not tested.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 byoungdale