<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><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/">http://files-sync.freeswitch.org/windows_installer/</a> Its tagged as 1.0.4 and shouldn't be.</div><div><br></div></div></div><div>/b</div><div><br></div><div><br></div><div><br><div><div>On Feb 4, 2010, at 8:48 PM, Adam Wilt wrote:</div><br class="Apple-interchange-newline"><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 class="webkit-indent-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 class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><font class="Apple-style-span" color="#000099">#!/usr/local/bin/lua</font></span></div></div></div><div><div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><font class="Apple-style-span" color="#000099"> </font></span></div></div></div><div><div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><font class="Apple-style-span" color="#000099">session:answer()</font></span></div></div></div><div><div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><font class="Apple-style-span" color="#000099">api = freeswitch.API()</font></span></div></div></div><div><div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><font class="Apple-style-span" color="#000099">api:executeString("bgapi uuid_park " .. tostring(session.uuid))</font></span></div></div></div><div><div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><font class="Apple-style-span" 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 class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><font class="Apple-style-span" 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></body></html>