<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">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 class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 23, 2014, at 11:48 AM, David Villasmil Govea <<a href="mailto:david.villasmil@gmail.com" class="">david.villasmil@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><p dir="ltr" class="">Hello Guys,</p><p dir="ltr" class="">I receive a call from side A and send it out to side B.<br class="">
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" class="">I'm doing everything with lua and I've tried:</p><p dir="ltr" class="">on my dialplan I have:<br class=""></p><p dir="ltr" class=""> <action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/></p><p dir="ltr" class="">in check_answered-lua, after checking the call was in fact answered I do:</p><p dir="ltr" class=""> session:execute("transfer", "-bleg 9999 XML default");</p><p dir="ltr" class="">and on my dialplan I have:</p><p dir="ltr" class="">        <extension name="9999"><br class="">
         <action application="log" data="INFO SENDING CALL TO QUEUE >>>>>>>>>>>>>>>>>>"/><br class="">
         <action application="lua" data="/usr/local/freeswitch/scripts/queue.lua"/><br class="">
         <action application="hangup" data="NORMAL_CLEARING"/><br class="">
        </extension></p><p dir="ltr" class="">queue.lua:</p><p dir="ltr" class="">session:execute("sched_hangup","+50 alloted_timeout");<br class="">
session:execute("callcenter","agents_queue");</p><p dir="ltr" class="">session:execute("sleep",my_dur);<br class=""></p><p dir="ltr" class="">But this doesn't seem to work at all...</p><p dir="ltr" class="">Can anyone give me a hand? thanks!<br class=""></p><p dir="ltr" class="">-- <br class="">
DVG<br class="">
</p>
_________________________________________________________________________<br class="">Professional FreeSWITCH Consulting Services: <br class=""><a href="mailto:consulting@freeswitch.org" class="">consulting@freeswitch.org</a><br class="">http://www.freeswitchsolutions.com<br class=""><br class="">Official FreeSWITCH Sites<br class="">http://www.freeswitch.org<br class="">http://confluence.freeswitch.org<br class="">http://www.cluecon.com<br class=""><br class="">FreeSWITCH-users mailing list<br class="">FreeSWITCH-users@lists.freeswitch.org<br class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br class="">UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br class="">http://www.freeswitch.org</div></blockquote></div><br class=""></div></body></html>