From e47af57b080979eb82c54487cbbd63447d977d7b Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 14 Aug 2018 11:02:47 -0600 Subject: [PATCH] Update directory.lua --- .../resources/scripts/directory/directory.lua | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua b/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua index 2139539f36..0327a63c71 100644 --- a/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua +++ b/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua @@ -1,6 +1,6 @@ -- xml_handler.lua -- Part of FusionPBX --- Copyright (C) 2013 - 2016 Mark J Crane +-- Copyright (C) 2013 - 2018 Mark J Crane -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -338,9 +338,15 @@ forward_no_answer_destination = row.forward_no_answer_destination; forward_user_not_registered_enabled = row.forward_user_not_registered_enabled; forward_user_not_registered_destination = row.forward_user_not_registered_destination; - do_not_disturb = row.do_not_disturb; + -- get the follow me information + if (row.follow_me_uuid ~= nil and string.len(row.follow_me_uuid) > 0) then + follow_me_uuid = row.follow_me_uuid; + follow_me_enabled = row.follow_me_enabled; + follow_me_destinations= row.follow_me_destinations; + end + -- check matching UserID and AuthName if sip_auth_method then local check_from_number = METHODS[sip_auth_method] or METHODS._ANY_ @@ -349,7 +355,6 @@ else continue = (sip_from_user == user) and ((not check_from_number) or (from_user == user)) end - if not continue then XML_STRING = nil; return 1; @@ -606,6 +611,12 @@ if (forward_user_not_registered_destination ~= nil) and (string.len(forward_user_not_registered_destination) > 0) then table.insert(xml, [[ ]]); end + if (follow_me_enabled ~= nil) and (string.len(follow_me_enabled) > 0) then + table.insert(xml, [[ ]]); + end + if (follow_me_destinations ~= nil) and (string.len(follow_me_destinations) > 0) then + table.insert(xml, [[ ]]); + end if (do_not_disturb ~= nil) and (string.len(do_not_disturb) > 0) then table.insert(xml, [[ ]]); end