Hi all,
I was trying from a lua script call a remote destination and when it starts ringing i want to bridged it with another destination.
The problem is that the freswitch.session is blocking and it only returns when the call is already answer...
Is there a way, beside doing it by events, to get the complete status of a session?
the lua script:
dialstring = "{ignore_early_media=true}loopback/100/outgoing"
session = freeswitch.Session(dialstring);
-- check if is ringing...
uuid = session:getVariable('uuid')
state = api:executeString('eval uuid:' .. uuid .. ' ${Channel-Call-State}')
mlog.warning(state)
while (session:ready() == true) do
session:sleep(500)
mlog.debug('in session')
end