Update status_registrations.php
Add moteus fix to display lan ip for grandstream.
This commit is contained in:
parent
283253ac17
commit
f16b7851d6
|
|
@ -40,14 +40,23 @@ function get_registrations($sip_profile_name) {
|
|||
|
||||
//get network-ip to url or blank
|
||||
if(isset($row->{'network-ip'})) {
|
||||
$registrations[$x]['network-ip'] = "<a href='http://".$row->{'network-ip'}."' target='_blank'>".$row->{'network-ip'}."</a>";
|
||||
$registrations[$x]['network-ip'] = "<a href='http://".$row->{'network-ip'}."' target='_blank'>".$row->{'network-ip'}."</a>";
|
||||
}else{
|
||||
$registrations[$x]['network-ip'] = " ";
|
||||
}
|
||||
//get the LAN IP address if it exists replace the external ip
|
||||
$call_id_array = explode('@', $row->{'call-id'});
|
||||
if (isset($call_id_array[1])) {
|
||||
$registrations[$x]['lan-ip'] = "<a href='http://".$call_id_array[1]."' target='_blank'>".$call_id_array[1]."</a>";
|
||||
$agent = $row->{'agent'};
|
||||
$lan_ip = $call_id_array[1];
|
||||
if (false !== stripos($agent, 'grandstream')) {
|
||||
$lan_ip = str_ireplace(
|
||||
array('A','B','C','D','E','F','G','H','I','J'),
|
||||
array('0','1','2','3','4','5','6','7','8','9'),
|
||||
$lan_ip
|
||||
);
|
||||
}
|
||||
$registrations[$x]['lan-ip'] = "<a href='http://".$lan_ip."' target='_blank'>".$lan_ip."</a>";
|
||||
}else{
|
||||
$registrations[$x]['lan-ip'] = " ";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue