Replace io.popen with api:executeString
This commit is contained in:
parent
56f8d4ba44
commit
d897fad100
|
|
@ -64,6 +64,9 @@
|
||||||
:gsub('\'', '\\\''))
|
:gsub('\'', '\\\''))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--create the api object
|
||||||
|
api = freeswitch.API();
|
||||||
|
|
||||||
--set channel variables to lua variables
|
--set channel variables to lua variables
|
||||||
domain_uuid = env:getHeader("domain_uuid");
|
domain_uuid = env:getHeader("domain_uuid");
|
||||||
domain_name = env:getHeader("domain_name");
|
domain_name = env:getHeader("domain_name");
|
||||||
|
|
@ -230,9 +233,7 @@
|
||||||
cmd = cmd .. "fax_prefix=false ";
|
cmd = cmd .. "fax_prefix=false ";
|
||||||
end
|
end
|
||||||
freeswitch.consoleLog("notice", "[fax] command: " .. cmd .. "\n");
|
freeswitch.consoleLog("notice", "[fax] command: " .. cmd .. "\n");
|
||||||
local handle = io.popen(cmd);
|
result = api:executeString(cmd);
|
||||||
result = handle:read("*a");
|
|
||||||
handle:close();
|
|
||||||
|
|
||||||
--add to fax logs
|
--add to fax logs
|
||||||
sql = "insert into v_fax_logs ";
|
sql = "insert into v_fax_logs ";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue