[4.5] prevents routing errors (#5276)

* [4.5] prevents routing errors
* Update directory.lua
This commit is contained in:
Luis Daniel Lucio Quiroz
2020-05-18 15:53:43 -04:00
committed by GitHub
parent 064b999fef
commit 3a2265d92b

View File

@@ -394,6 +394,9 @@
contact = trim(api:execute("sofia_contact", destination));
array = explode('/',contact);
local profile, proxy = array[2], database_hostname;
if (profile == 'user_not_registered') then
profile = 'internal';
end
dial_string = "{sip_invite_domain=" .. domain_name .. ",presence_id=" .. presence_id .."}sofia/" .. profile .. "/" .. destination .. ";fs_path=sip:" .. proxy;
--freeswitch.consoleLog("notice", "[xml_handler][directory] dial_string " .. dial_string .. "\n");
end