transfer is a final action, the script must exit once it's been transferred.
i think you need to explain what you really want to do.
if it's just play a file use session:execute("playback", "file.wav")


On Mon, Jul 5, 2010 at 2:06 PM, Tony Tin <tony.tin@noahmedia.com.hk> wrote:
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


_______________________________________________
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




--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
googletalk:conf+888@conference.freeswitch.org
pstn:+19193869900