<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"><<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>></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 <<a href="mailto:david.villasmil@gmail.com" target="_blank">david.villasmil@gmail.com</a>> 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'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></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>