[Freeswitch-users] No ringback with Lua Call Control

Chris B. Ware chrisbware at yahoo.it
Tue Aug 21 14:31:55 MSD 2012


Hi,

I need a small lua script to originate two extension calls  and bridge them.
This is my script (based on lua wiki example):

local callee = argv[1]
local called = argv[2]
local domain = argv[3]

Adisp = "None";
param="{ignore_early_media=true,ringback=\'%(1000,4000,425,425)\',origination_caller_id_number="

legA=freeswitch.Session(param..callee.."}user/"..called);
while (Adisp~="ANSWER" and legA:ready()) do
         Adisp  = legA:getVariable("endpoint_disposition");
        os.execute("sleep 1")
end -- waiting for A to answer
if (Adisp=="ANSWER") then
        legB=freeswitch.Session(param..called.."}user/"..callee);
        freeswitch.bridge(legA,legB);
end

The script works but there's no ringback, when A answers and B is ringing.
When B answers, we can talk.

This is my log:
http://pastebin.freeswitch.org/19745



I know that something stupid is missing but I can't work out where's the error!
Any help?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120821/bec3208c/attachment.html 


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