<div dir="ltr">Hello,<div><br></div><div>Thanks for answering.</div><div>Not as soon as it is answered, but after doing some checks I do with lua.</div><div><br></div><div>regards,</div><div><br></div><div>David</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 23, 2014 at 9:08 PM, Michael Jerris <span dir="ltr">&lt;<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">If you need to un-bridge it as soon as its answered, why not just send it to the right destination in the first place?<div><br><div><blockquote type="cite"><div><div class="h5"><div>On Dec 23, 2014, at 11:48 AM, David Villasmil Govea &lt;<a href="mailto:david.villasmil@gmail.com" target="_blank">david.villasmil@gmail.com</a>&gt; wrote:</div><br></div></div><div><div><div class="h5"><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">-- <br>
DVG<br>
</p></div></div>
_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services: <br><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br><a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br><br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></div></blockquote></div><br></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">DVG<br><br>-- <br>Imagination is more important than knowledge<br>Albert Einstein</div>
</div>