[Freeswitch-users] fail to bridge 2 openzap channels
Tony Tin
tony.tin at noahmedia.com.hk
Mon Jul 5 12:06:42 PDT 2010
Hi,
I'm trying to bridge 2 openzap channels, one is inbound call, another is
outbound call.
Below is the Lua script which originates the outbound call in the inbound
call dialplan.
If the "transfer" line is commented out, bridge is working fine. I suspect
it is about call legs, but I can find the proper way to set then up. Could
anyone please help, thanks.
-------------------------------------------------------------------------------------
session_orig = freeswitch.Session("OpenZAP/2/a/98877666")
while session:getState()~="CS_HANGUP" do
os.execute("usleep 500000")
if session_orig:answered() then
break
end
end
-- need to play message to called party before bridge
-- comment out the below line, then bridge is working
session_orig:transfer("orig_ext", "xml", "default")
freeswitch.bridge(session, session_orig)
-------------------------------------------------------------------------------------
Regards,
Tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100706/d5828143/attachment.html
More information about the FreeSWITCH-users
mailing list