From 7f91e009b1c1a495aa73d73c5ca4999b60301e39 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 18 Jan 2022 16:45:48 -0700 Subject: [PATCH] Add registration count to the the SIP Status -> Profile Registrations button. --- app/sip_status/sip_status.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/sip_status/sip_status.php b/app/sip_status/sip_status.php index f2aa7326e1..d5de7bad66 100644 --- a/app/sip_status/sip_status.php +++ b/app/sip_status/sip_status.php @@ -103,6 +103,9 @@ message::add($message, 'negative', 5000); } +//define registration object + $registration = new registrations; + //include the header $document['title'] = $text['title-sip_status']; require_once "resources/header.php"; @@ -248,7 +251,7 @@ echo "
".$text['title-sofia-status-profile']." ".urlencode($sip_profile_name)."
\n"; echo "
\n"; echo button::create(['type'=>'button','label'=>$text['button-flush_registrations'],'icon'=>'eraser','collapse'=>'hide-xs','link'=>'cmd.php?profile='.urlencode($sip_profile_name).'&action=flush_inbound_reg']); - echo button::create(['type'=>'button','label'=>$text['button-registrations'],'icon'=>'phone-alt','collapse'=>'hide-xs','link'=>PROJECT_PATH.'/app/registrations/registrations.php?profile='.urlencode($sip_profile_name)]); + echo button::create(['type'=>'button','label'=>$text['button-registrations'].' ('.$registration->count($sip_profile_name).')','icon'=>'phone-alt','collapse'=>'hide-xs','link'=>PROJECT_PATH.'/app/registrations/registrations.php?profile='.urlencode($sip_profile_name)]); if ($profile_state == 'stopped') { echo button::create(['type'=>'button','label'=>$text['button-start'],'icon'=>$_SESSION['theme']['button_icon_start'],'collapse'=>'hide-xs','link'=>'cmd.php?profile='.urlencode($sip_profile_name).'&action=start']); }