[Freeswitch-users] Running a session asynchronously from a Lua script
Adam Wilt
wiltingtree at gmail.com
Thu Feb 4 18:48:07 PST 2010
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/lua
session: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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100204/f4f4ea15/attachment-0002.html
More information about the FreeSWITCH-users
mailing list