And another problem found. If the remote party answers immediately all is ok. But if remote waits more then 8-10 seconds before answer - the call is dropped when answered. Can't understand where to look for a problem.
Hello!
I found a problem. originate_session must not to be local.
Hello!
I'm trying to migrate DISA from Javascript to LUA. This peace of code works fine in Javascript:
ostr = "{ignore_early_media=true" + ",origination_caller_id_number=" + session.getVariable("caller_id_number") + "}sofia/ipbx/50004#" + digits + "@192.168.1.1:5060"; osession = new Session( ostr ); bridge(session, osession); osession.hangup();
With LUA not: originate_string = "{ignore_early_media=true" .. ",origination_caller_id_number=" .. session:getVariable("caller_id_number") .. "}" .. "sofia/ipbx/50004#" .. digits .. "@192.168.1.1:5060"; originate_session = freeswitch.Session( originate_string ); freeswitch.bridge(session, originate_session); originate_session:hangup();
The call is droped when remote answers. There is an error in log: bridge: session not ready. I tried to use if( originate_session:ready() ) then freeswitch.bridge(session, originate_session); originate_session:hangup(); end
with no luck :(. Please, help me. What am I doing wrong?
-- Regards, Boris