<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>Maybe you can set leg b </span><span style='font-size:9.5pt;font-family:Consolas;background:white;mso-highlight:white'>transfer_after_bridge</span><span style='font-size:9.5pt;font-family:Consolas'> and hang up on leg a.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><a name="_MailEndCompose"><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></a></p><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] <b>On Behalf Of </b>David Villasmil Govea<br><b>Sent:</b> Wednesday, December 31, 2014 2:41 PM<br><b>To:</b> FreeSWITCH Users Help<br><b>Subject:</b> Re: [Freeswitch-users] Unbridge and send to queue<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>can anyone help me out with this?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Tue, Dec 23, 2014 at 5:48 PM, David Villasmil Govea <<a href="mailto:david.villasmil@gmail.com" target="_blank">david.villasmil@gmail.com</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p>Hello Guys,<o:p></o:p></p><p>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?<o:p></o:p></p><p>I'm doing everything with lua and I've tried:<o:p></o:p></p><p>on my dialplan I have:<o:p></o:p></p><p> <action application="set" data="execute_on_answer=lua /usr/local/freeswitch/scripts/check_answered.lua"/><o:p></o:p></p><p>in check_answered-lua, after checking the call was in fact answered I do:<o:p></o:p></p><p> session:execute("transfer", "-bleg 9999 XML default");<o:p></o:p></p><p>and on my dialplan I have:<o:p></o:p></p><p><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><o:p></o:p></p><p>queue.lua:<o:p></o:p></p><p>session:execute("sched_hangup","+50 alloted_timeout");<br>session:execute("callcenter","agents_queue");<o:p></o:p></p><p>session:execute("sleep",my_dur);<o:p></o:p></p><p>But this doesn't seem to work at all...<o:p></o:p></p><p>Can anyone give me a hand? thanks!<o:p></o:p></p><p><span style='color:#888888'>-- <br>DVG<o:p></o:p></span></p></blockquote></div><p class=MsoNormal><br><br clear=all><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <o:p></o:p></p><div><p class=MsoNormal>DVG<br><br>-- <br>Imagination is more important than knowledge<br>Albert Einstein<o:p></o:p></p></div></div></div></body></html>