From 8f3f67f9c4c19e28073a083ea682de43ab47a495 Mon Sep 17 00:00:00 2001 From: boffart <> Date: Thu, 7 Nov 2024 12:08:18 +0300 Subject: [PATCH] =?UTF-8?q?#818=20=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20=D0=BE=D0=BF=D1=80=D0=B5=D0=B4=D0=B5=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=81=D1=82=D0=B0=D1=82=D1=83=D1=81=D0=BE?= =?UTF-8?q?=D0=B2=20=D1=82=D0=B5=D0=BB=D0=B5=D1=84=D0=BE=D0=BD=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Core/Asterisk/AsteriskManager.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Core/Asterisk/AsteriskManager.php b/src/Core/Asterisk/AsteriskManager.php index 3fbf7780..5c41e2b6 100644 --- a/src/Core/Asterisk/AsteriskManager.php +++ b/src/Core/Asterisk/AsteriskManager.php @@ -1399,6 +1399,7 @@ public function getPjSipPeers(): array $peers = []; $result = $this->sendRequestTimeout('PJSIPShowEndpoints'); $endpoints = $result['data']['EndpointList'] ?? []; + print_r($endpoints); foreach ($endpoints as $peer) { if ($peer['ObjectName'] === 'anonymous') { continue; @@ -1406,6 +1407,7 @@ public function getPjSipPeers(): array $state_array = [ 'Not in use' => 'OK', 'Busy' => 'OK', + 'Ringing' => 'OK' ]; $state = $state_array[$peer['DeviceState']] ?? 'UNKNOWN'; $oldAState = $peers[$peer['Auths']]['state'] ?? ''; @@ -1415,8 +1417,9 @@ public function getPjSipPeers(): array } $peers[$peer['Auths']] = [ - 'id' => $peer['Auths'], - 'state' => strtoupper($state) + 'id' => $peer['Auths'], + 'state' => strtoupper($state), + 'detailed-state' => $peer['DeviceState'] ]; } return array_values($peers);