<div><br></div>1) Pass one session as the constructor to another <div><br></div><div>session2 = new Session(&quot;sofia/internal/<a href="mailto:foo@bar.com">foo@bar.com</a>&quot;, session);</div><div><br></div><div>This will make the originate stop of session hangs up and pass other critical caller info to session2.</div>
<div><br></div><div>2) don&#39;t create session2 just use the bridge app</div><div><br></div><div>This is the same effect with less sessions to worry about.</div><div>session:execute(&quot;bridge&quot;, &quot;sofia/internal/<a href="mailto:foo@bar.com">foo@bar.com</a>&quot;);</div>
<meta charset="utf-8"><div><br></div><div>3) use mod_fifo that already does agent ACD</div><div><br><br><div class="gmail_quote">On Tue, Jul 27, 2010 at 6:40 AM, Sias Mey <span dir="ltr">&lt;<a href="mailto:sias@cpdata.co.za">sias@cpdata.co.za</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<br>
<br>
I am working on porting an outbound CC app from asterisk to FS.<br>
<br>
method:<br>
<br>
I originate a call to the agents phone and if they answer I<br>
bridge/originate and then bridge/connect to a conferance and transfer to<br>
an outbound line.<br>
<br>
In all of those scenarios if I use JS to do two seperate originates I<br>
have the same issue.<br>
<br>
problem:<br>
<br>
If the agent hangs up his phone before a connection on the second<br>
originate both lines stay open untill something happens to the second<br>
leg.<br>
<br>
If there is an originate timeout on it and it isent answered then both<br>
legs with hangup as soon as the second leg terminates as well. If the<br>
client picks up the phone then both will teminate too, this of course<br>
leads to a really bad &quot;ring ring, hello?, click&quot; situation with the<br>
agent not even aware that it is happening.<br>
<br>
If I use a single originate directly to a bridge then both legs<br>
terminate as soon as the agent/first leg is hung up, with both<br>
api_hanguphooks running as expected. It seems to only be an issue if I<br>
originate to park() and then connect the two via JS or if I originate<br>
directly to a JS file that then generates and bridges the other session.<br>
<br>
I have managed to work arround it with a fairly rediculous originate api<br>
call moving some lcr and balancing code into my frontend rather than a<br>
FS JS script. But this means my application has to be aware of the<br>
number of calls per lcr route and all sorts of things that I would  have<br>
prefered to handle in FS directly.<br>
<br>
I dont know if this is a design feature to alleviate the post hangup<br>
code issues that I had in asterisk, or if it is just the way I am<br>
implementing it that is messing me arround.<br>
<br>
So if one of you guys that know the internals really well can help me<br>
out with a reason or workarround for this behaviour I would greatly<br>
appreciate it.<br>
<br>
Again there is no urgency to this anymore since my current<br>
implementation works fine. But I would like to understand the underlying<br>
causes of this behaviour if that is possible to explain without a &quot;go<br>
read the code&quot; :-D.<br>
<br>
Thank you very much,<br>
Sias<br>
<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"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>
</div>