Hello,

I need to hang up the b-leg of the answered call, play the message to a-leg, and dial a new b-leg after a while when message is still playing. How to achieve this, please?

I tried to use ring_ready, but it won't start playing until the new b-leg starts ringing.
Any recommendations so I don't have to manage sessions manually?

Everything will be clearer from the following dialplan. I need the message to start playing right at ring_ready and not when the callee2 starts ringing:

<action application='set' data='hangup_after_bridge=false'/>
<action application='set' data='execute_on_answer=sched_hangup +10 normal_clearing bleg'/>
<action application='bridge' data='sofia/gateway/server/callee1'/>
<action application='set' data='ringback=local_stream://message'/>
<action application='ring_ready'/>
<action application='sleep' data='10000'/>
<action application='set' data='ignore_early_media=true'/>
<action application='bridge' data='sofia/gateway/server/callee2'/>
<action application='hangup'/>

Best regards,

kokoska.rokoska