lua: els_bgapi.lua:20: attempt to index global 'e_con' (a number value)
stack traceback:
els_bgapi.lua:20: in main chunk
[C]: in ?
Please help me am new to Lua and FreeSWITCH when ran the code below got the error above
sock:bgapi("originate","{sip_cid_type=pid,origination_uuid=uuid,origination_caller_id_number=65181,originate_timeout=10}sofia/external/sip:81245@10.20.16.135 5000")
e_con= sock:events("plain","all");
if (e_con) then
print(e_con:getHeader());
else
print("not e_con")
end
sock:eventsreturns a number, not an object that you can callgetHeaderon.