<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&#39;m doing everything with lua and I&#39;ve tried:</p>
<p dir="ltr">on my dialplan I have:<br></p>
<p dir="ltr">    &lt;action application=&quot;set&quot; data=&quot;execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua&quot;/&gt;</p>
<p dir="ltr">in check_answered-lua, after checking the call was in fact answered I do:</p>
<p dir="ltr">    session:execute(&quot;transfer&quot;, &quot;-bleg 9999 XML default&quot;);</p>
<p dir="ltr">and on my dialplan I have:</p>
<p dir="ltr">        &lt;extension name=&quot;9999&quot;&gt;<br>
          &lt;action application=&quot;log&quot; data=&quot;INFO SENDING CALL TO QUEUE &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&quot;/&gt;<br>
          &lt;action application=&quot;lua&quot; data=&quot;/usr/local/freeswitch/scripts/queue.lua&quot;/&gt;<br>
          &lt;action application=&quot;hangup&quot; data=&quot;NORMAL_CLEARING&quot;/&gt;<br>
        &lt;/extension&gt;</p>
<p dir="ltr">queue.lua:</p>
<p dir="ltr">session:execute(&quot;sched_hangup&quot;,&quot;+50 alloted_timeout&quot;);<br>
session:execute(&quot;callcenter&quot;,&quot;agents_queue&quot;);</p>
<p dir="ltr">session:execute(&quot;sleep&quot;,my_dur);<br></p>
<p dir="ltr">But this doesn&#39;t seem to work at all...</p>
<p dir="ltr">Can anyone give me a hand? thanks!<br></p>
<p dir="ltr">David</p>