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']."";