Skip to content

Commit

Permalink
#728 Не корректно вычисляется хэш критических настроек SIP, которые т…
Browse files Browse the repository at this point in the history
…ребуют restart asterisk
  • Loading branch information
boffart committed Jun 5, 2024
1 parent 44196a6 commit f7b96d6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Core/Asterisk/Configs/SIPConf.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,15 @@ public function needAsteriskRestart(): bool
if ($di === null) {
return false;
}
$mikoPBXConfig = new MikoPBXConfig();
[$topology, $extIpAddress, $externalHostName, $subnets] = $this->getTopologyData();

$generalSettings = $mikoPBXConfig->getGeneralSettings();
$now_hash = md5($topology . $externalHostName . $extIpAddress . $generalSettings[PbxSettingsConstants::SIP_PORT]. $generalSettings[PbxSettingsConstants::TLS_PORT] . implode('',$subnets));
$externalSipPort = $this->generalSettings[PbxSettingsConstants::EXTERNAL_SIP_PORT];
$externalTlsPort = $this->generalSettings[PbxSettingsConstants::EXTERNAL_TLS_PORT];
$sipPort = $this->generalSettings[PbxSettingsConstants::SIP_PORT];
$tlsPort = $this->generalSettings[PbxSettingsConstants::TLS_PORT];

$now_hash = md5($topology . $externalHostName . $extIpAddress . $sipPort.$externalSipPort. $tlsPort .$externalTlsPort. implode('',$subnets));

$old_hash = '';
$varEtcDir = $di->getShared('config')->path('core.varEtcDir');
if (file_exists($varEtcDir . self::TOPOLOGY_HASH_FILE)) {
Expand Down

0 comments on commit f7b96d6

Please sign in to comment.