Brian,
I wouldn't do it like that...I would let FreeSWITCH do what its good at and stop trying to create and manage sessions manually.-- You can optionally answer but you need to set transfer_ringback instead of ringback.session:setVariable("ringback", "local_stream://moh");session:setVariable("ignore_early_media", "true");session:execute("bridge","user/1007");Which can also be expressed in pure XML as such:<extension name="1234"><condition field="destination_number" expression="^1234$"><action application="set" data="ringback=local_stream://moh"/><action application="set" data="ignore_early_media=true"/><action application="bridge" data="user/1007"/></condition></extension>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.
In addition I would recommend you get the latest 1.0.5 build http://files-sync.freeswitch.org/windows_installer/ Its tagged as 1.0.4 and shouldn't be./bOn Feb 4, 2010, at 8:48 PM, Adam Wilt wrote:Hi all,I want to park an inbound call and play hold music while I simultaneously place another outbound call.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.Here's my example code:#!/usr/local/bin/luasession:answer()api = freeswitch.API()api:executeString("bgapi uuid_park " .. tostring(session.uuid))api:executeString("bgapi uuid_broadcast " .. tostring(session.uuid) .. " /freeswitch/sounds/music/8000/danza-espanola-op-37-h-142-xii-arabesca.wav")local new_session = freeswitch.Session("sofia/gateway/myprovider/15555555555")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.By the way, I'm using FreeSWITCH 1.0.4 in Windows.Thanks,Adam
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org