mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-04 10:43:49 +00:00
Change. Reduce search parent host name.
This can be done because child and parent channels have to be on same FS.
This commit is contained in:
@@ -138,6 +138,8 @@
|
||||
end
|
||||
|
||||
-- search parent hostname
|
||||
call_hostname = hostname
|
||||
--[[ parent and child have to be on same box so we do not search it
|
||||
log.notice("Found parent channel try detect parent hostname")
|
||||
local dbh = Database.new('switch')
|
||||
local sql = "SELECT hostname FROM channels WHERE uuid='" .. parent_uuid .. "'"
|
||||
@@ -148,6 +150,7 @@
|
||||
log.notice("Can not find host name. Channels is dead?")
|
||||
return true
|
||||
end
|
||||
--]]
|
||||
|
||||
if hostname == call_hostname then
|
||||
log.notice("Found parent call on local machine. Do intercept....")
|
||||
@@ -288,18 +291,22 @@
|
||||
channel_variable(uuid, 'fifo_bridge_uuid') or
|
||||
uuid
|
||||
|
||||
--[[ parent and child have to be on same box so we do not search it
|
||||
if parent_uuid ~= uuid then
|
||||
uuid = parent_uuid
|
||||
local sql = "SELECT hostname FROM channels WHERE uuid='" .. uuid .. "'"
|
||||
call_hostname = dbh:first_value(sql)
|
||||
end
|
||||
--]]
|
||||
|
||||
if call_hostname then
|
||||
uuid = parent_uuid
|
||||
if call_hostname ~= hostname then
|
||||
log.noticef("Found parent call on remote machine `%s`.", call_hostname)
|
||||
else
|
||||
log.notice("Found parent call on local machine.")
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
log.noticef("Found child call on remote machine `%s`.", call_hostname)
|
||||
-- we can not find parent on this box because channel on other box so we have to
|
||||
|
||||
Reference in New Issue
Block a user