The level of control you need really isn't served by doing scripting from the dialplan. I highly recommend using ESL and the event socket. It will mean a bit of a paradigm shift in your coding, but with that shift comes a lot of power and control over what you can do with the calls - really limited only by your imagination.<br>
<br>-MC<br><br><div class="gmail_quote">On Fri, Jul 31, 2009 at 8:01 AM, peely <span dir="ltr"><<a href="mailto:freeswitch@peely.com">freeswitch@peely.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi,<br>
<br>
I'm trying to develop an application using lua and need to control the<br>
inbound and outbound legs independently, even when they are switched<br>
together.<br>
<br>
I can initiate the outbound session but I can't seem to bridge without<br>
losing control of the script.<br>
<br>
For example, if I use:<br>
<br>
<br>
local api = freeswitch.API();<br>
inSession = session;<br>
inSession:answer();<br>
inSession:setAutoHangup(false);<br>
<br>
<br>
egSession = freeswitch.Session("sofia/default/<a href="mailto:mynum@mydomain.com">mynum@mydomain.com</a>");<br>
egSession:setAutoHangup(false);<br>
<br>
if egSession:ready() then<br>
api:execute("uuid_bridge",inSession.uuid .. " " .. egSession.uuid);<br>
end<br>
<br>
while egSession:ready() do<br>
inSession:sleep(1000);<br>
end<br>
<br>
Then I lose the script entirely, and if I use:<br>
<br>
inSession:execute("bridge", "sofia/default/<a href="mailto:mynum@mydomain.com">mynum@mydomain.com</a>")<br>
<br>
Then I lose the ability to control the call whilst the outbound is in<br>
progress.<br>
<br>
Does anyone know a way I can allow ingress to egress calling whilst still<br>
maintaining script control mid-call? I also need to ingress to hear<br>
provisional speech during outbound connect. I've looked at conferencing but<br>
there seems to be quite a lot of automated messaging.<br>
<br>
<br>
<br>
Thanks,<br>
<br>
<br>
Neil.<br>
<br>
--<br>
View this message in context: <a href="http://www.nabble.com/LUA%3A-Independent-control-of-each-call-leg.-tp24744087p24744087.html" target="_blank">http://www.nabble.com/LUA%3A-Independent-control-of-each-call-leg.-tp24744087p24744087.html</a><br>
Sent from the Freeswitch-users mailing list archive at Nabble.com.<br>
<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>