From 6d82e28c852b388bd51ec05eca6b25581ad95937 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 2 Aug 2018 02:28:01 -0600 Subject: [PATCH] Update device_edit.php --- app/devices/device_edit.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index 4be655cefa..5d8e05cc08 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -626,14 +626,25 @@ $mode = '4'; } - //build the xml + //get the device line settings $row = $device_lines[0]; + + //set the outbound proxy settings + if (strlen($row['outbound_proxy_primary']) == 0) { + $outbound_proxy_primary = $row['server_address']; + } + else { + $outbound_proxy_primary = $row['outbound_proxy_primary']; + } + $outbound_proxy_secondary = $row['outbound_proxy_secondary']; + + //build the xml $xml = ""; $xml .= ""; $xml .= ""; $xml .= "".$row['server_address'].""; - $xml .= "".$row['outbound_proxy_primary'].":".$row['sip_port'].""; - $xml .= "".$row['outbound_proxy_secondary'].":".$row['sip_port'].""; + $xml .= "".$outbound_proxy_primary.":".$row['sip_port'].""; + $xml .= "".$outbound_proxy_secondary.":".$row['sip_port'].""; $xml .= "".$row['user_id'].""; $xml .= "".$row['auth_id'].""; $xml .= "".$row['password']."";