Brian, <div><br></div><div>Thanks for the reply. </div><div>The problem is I don't want the two parties to speak to each other. I want one party to wait on hold while the system interacts with the other party. Then the system will hang-up on the second party and start interacting with the first party again.</div>
<div><br></div><div>Thanks,</div><div>Adam</div><div><br><br><div class="gmail_quote">On Thu, Feb 4, 2010 at 10:23 PM, Brian West <span dir="ltr"><<a href="mailto:brian@freeswitch.org">brian@freeswitch.org</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"><div>I wouldn't do it like that...</div><div><br></div><div>I would let FreeSWITCH do what its good at and stop trying to create and manage sessions manually.</div>
<div><br></div><div><div>-- You can optionally answer but you need to set transfer_ringback instead of ringback.</div><div>session:setVariable("ringback", "local_stream://moh"); </div>
<div>session:setVariable("ignore_early_media", "true"); </div><div>session:execute("bridge","user/1007"); </div>
<div><br></div><div>Which can also be expressed in pure XML as such:</div><div><br></div><div><div><extension name="1234"></div><div> <condition field="destination_number" expression="^1234$"> </div>
<div> <action application="set" data="ringback=local_stream://moh"/></div><div> <action application="set" data="ignore_early_media=true"/></div><div> <action application="bridge" data="user/1007"/></div>
<div> </condition></div><div></extension></div><div><br></div><div>There is really no need to do this with Lua. The XML dialplan can do some VERY complex things once you wrap your head around it.</div><div><br>
</div><div>In addition I would recommend you get the latest 1.0.5 build <a href="http://files-sync.freeswitch.org/windows_installer/" target="_blank">http://files-sync.freeswitch.org/windows_installer/</a> Its tagged as 1.0.4 and shouldn't be.</div>
<div><br></div></div></div><font color="#888888"><div>/b</div></font><div><div></div><div class="h5"><div><br></div><div><br></div><div><br><div><div>On Feb 4, 2010, at 8:48 PM, Adam Wilt wrote:</div><br><blockquote type="cite">
Hi all,<div><br></div><div>I want to park an inbound call and play hold music while I simultaneously place another outbound call.<div>But the hold music doesn't play while the lua script is placing the second call. When the lua script ends, the hold music finally starts. </div>
<div>Here's my example code:</div><div><br></div></div><blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:40px;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px">
<div><div><div><span style="background-color:rgb(255, 255, 255)"><font color="#000099">#!/usr/local/bin/lua</font></span></div></div></div><div><div><div><span style="background-color:rgb(255, 255, 255)"><font color="#000099"> </font></span></div>
</div></div><div><div><div><span style="background-color:rgb(255, 255, 255)"><font color="#000099">session:answer()</font></span></div></div></div><div><div><div><span style="background-color:rgb(255, 255, 255)"><font color="#000099">api = freeswitch.API()</font></span></div>
</div></div><div><div><div><span style="background-color:rgb(255, 255, 255)"><font color="#000099">api:executeString("bgapi uuid_park " .. tostring(session.uuid))</font></span></div></div></div><div><div><div><span style="background-color:rgb(255, 255, 255)"><font color="#000099">api:executeString("bgapi uuid_broadcast " .. tostring(session.uuid) .. " /freeswitch/sounds/music/8000/danza-espanola-op-37-h-142-xii-arabesca.wav")</font></span></div>
</div></div><div><div><div><span style="background-color:rgb(255, 255, 255)"><font color="#000099">local new_session = freeswitch.Session("sofia/gateway/myprovider/15555555555")</font></span></div></div></div></blockquote>
<div><div><div><br></div><div>So it seems like the script is blocking the original session, despite the fact that I'm using bgapi. I'd really appreciate if somebody could help me with this.</div><div><br></div><div>
By the way, I'm using FreeSWITCH 1.0.4 in Windows.</div><div><br></div><div>Thanks,</div><div>Adam</div></div></div></blockquote></div><br></div></div></div></div><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>
<br></blockquote></div><br></div>