<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=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@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:"Andale Mono";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:SimSun;
        mso-fareast-language:ZH-CN;}
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;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@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;mso-fareast-language:EN-US'>This may be able to help you but I set session</span><span style='font-size:9.5pt;font-family:Consolas;background:white;mso-highlight:white;mso-fareast-language:EN-US'>.SetAutoHangup(false);</span><span style='font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-US'>This will stop the dial plan from ending.</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US'><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;mso-fareast-language:EN-US'><o:p> </o:p></span></a></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><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>ax lyb<br><b>Sent:</b> Thursday, January 15, 2015 2:52 AM<br><b>To:</b> freeswitch-users@lists.freeswitch.org<br><b>Subject:</b> [Freeswitch-users] how can i keep A-LEG do not hangup<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>All:<o:p></o:p></p><div><p class=MsoNormal> recently i write a small program based freeswitch, in this program i only do things like callcenter mod,<o:p></o:p></p></div><div><p class=MsoNormal>here is what i do:<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal> 1. originate a call (“ originate sofia/gateway/gw01/xxxx my-out-call XML default”), in the default.xml,<o:p></o:p></p></div><div><p class=MsoNormal> i already config it as follow:<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal> <span style='font-family:"Andale Mono",serif;color:#FFF6F4;background:black'> </span><span style='font-family:"Andale Mono",serif;color:#34BBC7;background:black'><extension </span><span style='font-family:"Andale Mono",serif;color:#34BD26;background:black'>name</span><span style='font-family:"Andale Mono",serif;color:#FFF6F4;background:black'>=</span><span style='font-family:"Andale Mono",serif;color:#C33720;background:black'>“my-call-out"</span><span style='font-family:"Andale Mono",serif;color:#34BBC7;background:black'>></span><o:p></o:p></p></div><div><p class=MsoNormal style='background:black'><span style='font-family:"Andale Mono",serif;color:#CE7924'> 65 </span><span style='font-family:"Andale Mono",serif;color:#FFF6F4'> </span><span style='font-family:"Andale Mono",serif;color:#34BBC7'><condition </span><span style='font-family:"Andale Mono",serif;color:#34BD26'>field</span><span style='font-family:"Andale Mono",serif;color:#FFF6F4'>=</span><span style='font-family:"Andale Mono",serif;color:#C33720'>"destination_number"</span><span style='font-family:"Andale Mono",serif;color:#34BBC7'> </span><span style='font-family:"Andale Mono",serif;color:#34BD26'>expression</span><span style='font-family:"Andale Mono",serif;color:#FFF6F4'>=</span><span style='font-family:"Andale Mono",serif;color:#C33720'>"^my-call-out$"</span><span style='font-family:"Andale Mono",serif;color:#34BBC7'>></span><span style='font-family:"Andale Mono",serif;color:#C33720'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:black'><span style='font-family:"Andale Mono",serif;color:#CE7924'> 66 </span><span style='font-family:"Andale Mono",serif;color:#FFF6F4'> </span><span style='font-family:"Andale Mono",serif;color:#34BBC7'><action </span><span style='font-family:"Andale Mono",serif;color:#34BD26'>application</span><span style='font-family:"Andale Mono",serif;color:#FFF6F4'>=</span><span style='font-family:"Andale Mono",serif;color:#C33720'>"socket"</span><span style='font-family:"Andale Mono",serif;color:#34BBC7'> </span><span style='font-family:"Andale Mono",serif;color:#34BD26'>data</span><span style='font-family:"Andale Mono",serif;color:#FFF6F4'>=</span><span style='font-family:"Andale Mono",serif;color:#C33720'>"127.0.0.1:9600 async full"</span><span style='font-family:"Andale Mono",serif;color:#34BBC7'>/></span><span style='font-family:"Andale Mono",serif;color:#C33720'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:black'><span style='font-family:"Andale Mono",serif;color:#CE7924'> 67 </span><span style='font-family:"Andale Mono",serif;color:#FFF6F4'> </span><span style='font-family:"Andale Mono",serif;color:#5330E1'><!-- <action application="log" data="This is ax-call-out-park"/><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:black'><span style='font-family:"Andale Mono",serif;color:#CE7924'> 68 </span><span style='font-family:"Andale Mono",serif;color:#5330E1'> <action application="answer" /><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:black'><span style='font-family:"Andale Mono",serif;color:#CE7924'> 69 </span><span style='font-family:"Andale Mono",serif;color:#5330E1'> <action application="playback" data="/usr/local/freeswitch/sounds/1.wav"/><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:black'><span style='font-family:"Andale Mono",serif;color:#CE7924'> 70 </span><span style='font-family:"Andale Mono",serif;color:#5330E1'> <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:black'><span style='font-family:"Andale Mono",serif;color:#CE7924'> 71 </span><span style='font-family:"Andale Mono",serif;color:#5330E1'> <action application="park" data=""/> --><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:black'><span style='font-family:"Andale Mono",serif;color:#CE7924'> 72 </span><span style='font-family:"Andale Mono",serif;color:#FFF6F4'> </span><span style='font-family:"Andale Mono",serif;color:#34BBC7'></condition><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:black'><span style='font-family:"Andale Mono",serif;color:#CE7924'> 73 </span><span style='font-family:"Andale Mono",serif;color:#FFF6F4'> </span><span style='font-family:"Andale Mono",serif;color:#34BBC7'></extension><o:p></o:p></span></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal> 2. when call-out-destination customer pick up the call, i control the flow to playback a wav file, then ,<o:p></o:p></p></div><div><p class=MsoNormal> bridge the call to a free agent while the wav file play over in CHANNEL_EXECUTE_COMPLETE,<o:p></o:p></p></div><div><p class=MsoNormal> these steps run normally ok.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal> 3. the question is : if i have two agent in one moment, and this time i have 3 or > 3 out-call to bridge, <o:p></o:p></p></div><div><p class=MsoNormal> i’ll leave the other call do nothing,for i can not get more free agents to service; some special scene<o:p></o:p></p></div><div><p class=MsoNormal> is i have two agents (A1,A2) service 3 call (C1,C2,C3), A1 service C1, A2 service C2,then C3 is only <o:p></o:p></p></div><div><p class=MsoNormal> A-LEG when play over a wav file,about 100 seconds later, C3 is hangup(it’s not user hangup manually),<o:p></o:p></p></div><div><p class=MsoNormal> how can i do make the C3 call not hangup until i get a free agent to service it?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal> any suggest is appreciate,<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal> <a href="mailto:ax.lyb.lei@gmail.com">ax.lyb.lei@gmail.com</a><o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div></div></body></html>