I'm really confused.....
I have included the log, lua code from intercept.lua and the SQL query.
When I make a call and try and intercept it and run the query on the database thru admirer I see the active call but looking at the log I should see more output and the Call Hostname: should not be empty?
I change my domain name to sub.domain.com.
I have included the log, lua code from intercept.lua and the SQL query.
When I make a call and try and intercept it and run the query on the database thru admirer I see the active call but looking at the log I should see more output and the Call Hostname: should not be empty?
I change my domain name to sub.domain.com.
Code:
EXECUTE sofia/internal/101@sub.domain.com lua(intercept.lua 102)
2018-10-26 11:33:30.411359 [NOTICE] switch_cpp.cpp:1365 [intercept] INTERCEPT 102
2018-10-26 11:33:30.411359 [DEBUG] freeswitch_lua.cpp:365 DBH handle 0x10c6930 Connected.
2018-10-26 11:33:30.411359 [NOTICE] switch_cpp.cpp:1365 [intercept] SQL: SELECT uuid, call_uuid, hostname FROM channels WHERE callstate IN ('RINGING', 'EARLY') AND (1 <> 1 OR direction = 'outbound' ) AND (1<>1 OR presence_id = :presence_id_1 ) AND call_uuid IS NOT NULL LIMIT 1 ; params: {"presence_id_1":"102@sub.domain.com"}
2018-10-26 11:33:30.411359 [NOTICE] switch_cpp.cpp:1365 [intercept] DB Queried
2018-10-26 11:33:30.411359 [DEBUG] freeswitch_lua.cpp:382 DBH handle 0x10c6930 released.
2018-10-26 11:33:30.411359 [NOTICE] switch_cpp.cpp:1365 [intercept] Hostname: master Call Hostname:
2018-10-26 11:33:30.411359 [DEBUG] switch_cpp.cpp:1112 sofia/internal/101@sub.domain.com destroy/unlink session from object
2018-10-26 11:33:30.411359 [NOTICE] switch_core_state_machine.c:385 sofia/internal/101@sub.domain.com has executed the last dialplan instruction, hanging up.
2018-10-26 11:33:30.411359 [NOTICE] switch_core_state_machine.c:387 Hangup sofia/internal/101@sub.domain.com [CS_EXECUTE] [NORMAL_CLEARING]
Code:
sql = sql .. ") ";
sql = sql .. "AND call_uuid IS NOT NULL ";
sql = sql .. "LIMIT 1 ";
if (debug["sql"]) then
log.noticef("SQL: %s; params: %s", sql, json.encode(params));
end
local is_child
dbh:query(sql, params, function(row)
for key, val in pairs(row) do
log.notice("row "..key.." "..val);
end
log.notice("-----------------------");
is_child = (row.uuid == row.call_uuid)
uuid = row.call_uuid;
call_hostname = row.hostname;
end);
log.notice("DB Queried ");
Code:
SELECT uuid, call_uuid, hostname FROM channels WHERE callstate IN ('RINGING', 'EARLY') AND (1 <> 1 OR direction = 'outbound' ) AND (1<>1 OR presence_id = '102@sub.domain.com' ) AND call_uuid IS NOT NULL LIMIT 1;