From 6f2365fe242f95e2cf41854d49279ad3687b8e4f Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 2 Dec 2020 12:30:02 -0700 Subject: [PATCH] Update call_center_agent_edit.php --- app/call_centers/call_center_agent_edit.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/call_centers/call_center_agent_edit.php b/app/call_centers/call_center_agent_edit.php index 1cb143ee77..8fff6c511f 100644 --- a/app/call_centers/call_center_agent_edit.php +++ b/app/call_centers/call_center_agent_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2019 + Portions created by the Initial Developer are Copyright (C) 2008-2020 the Initial Developer. All Rights Reserved. Contributor(s): @@ -152,6 +152,12 @@ $users = $database->select($sql, $parameters, 'all'); unset($sql, $parameters); + //change the contact string to loopback - Not recommended added for backwards comptability causes multiple problems + if ($_SESSION['call_center']['agent_contact_method']['text'] == 'loopback') { + $agent_contact = str_replace("user/", "loopback/", $agent_contact); + $agent_contact = str_replace("@", "/", $agent_contact); + } + //prepare the array $array['call_center_agents'][0]['domain_uuid'] = $_SESSION['domain_uuid']; $array['call_center_agents'][0]['call_center_agent_uuid'] = $call_center_agent_uuid; @@ -599,4 +605,4 @@ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?>