<p dir="ltr">Hello Guys,</p>
<p dir="ltr">I receive a call from side A and send it out to side B.<br>
I need to unbridge this call once it is answered and send the B side to a queue to give it moh. How do I do that?</p>
<p dir="ltr">I'm doing everything with lua and I've tried:</p>
<p dir="ltr">on my dialplan I have:<br></p>
<p dir="ltr"> <action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/></p>
<p dir="ltr">in check_answered-lua, after checking the call was in fact answered I do:</p>
<p dir="ltr"> session:execute("transfer", "-bleg 9999 XML default");</p>
<p dir="ltr">and on my dialplan I have:</p>
<p dir="ltr">        <extension name="9999"><br>
         <action application="log" data="INFO SENDING CALL TO QUEUE >>>>>>>>>>>>>>>>>>"/><br>
         <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/><br>
         <action application="hangup" data="NORMAL_CLEARING"/><br>
        </extension></p>
<p dir="ltr">queue.lua:</p>
<p dir="ltr">session:execute("sched_hangup","+50 alloted_timeout");<br>
session:execute("callcenter","agents_queue");</p>
<p dir="ltr">session:execute("sleep",my_dur);<br></p>
<p dir="ltr">But this doesn't seem to work at all...</p>
<p dir="ltr">Can anyone give me a hand? thanks!<br></p>
<p dir="ltr">-- <br>
DVG<br>
</p>