[Freeswitch-users] Lua "two steps" bridging

chrisbware at interfree.it chrisbware at interfree.it
Tue Sep 13 13:39:33 MSD 2011


Hi guys,

I've read anything on this argument on Wiki but I can't find a complete answer.

I need to bridge two calls in Lua, waiting the first to be answered.
My basic script is:

local GwParams = "origination_caller_id_number="..gateway..",sip_auth_username="..gateway..",sip_auth_password="..sip_passwd
local slegA = "[ignore_early_media=false,"..GwParams.."]sofia/external/"..callee.."@"..sip_domain
local slegB = "[ignore_early_media=true,"..GwParams.."]sofia/external/"..called.."@"..sip_domain

legA = freeswitch.Session(slegA);
legB = freeswitch.Session(slegB);
freeswitch.bridge(legA, legB);


It works but legA and legB are called at the same time. Using:

while (legA:answered()== false) do end;

between the two session do the job but called parties can't hear  audio.

I promise to add a script on wiki if you help me ! :)

Thanks in advance.


-------------------------------------------------------------------------------
Valore legale alle tue mail
InterfreePEC - la tua Posta Elettronica Certificata
http://pec.interfree.it
-------------------------------------------------------------------------------




Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list