Fix step 5 ConfigGenerator call and add generateAndApply static helper
This commit is contained in:
1 parent
2be6e66300
commit
fb0997e759
2 files changed
+11
-1
No files matched your search
+2
-1
@@ -284,7 +284,8 @@ if ($st) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Génération initiale de pjsip.conf et extensions.conf
|
// Génération initiale de pjsip.conf et extensions.conf
|
||||||
App\ConfigGenerator::generateAndApply($db);
|
$generator = new App\ConfigGenerator($db);
|
||||||
|
$generator->writeAllConfigs();
|
||||||
|
|
||||||
// Initialisation de l annuaire et synchronisation
|
// Initialisation de l annuaire et synchronisation
|
||||||
App\PhonebookManager::initDirectory();
|
App\PhonebookManager::initDirectory();
|
||||||
|
|||||||
@@ -20,6 +20,15 @@ class ConfigGenerator
|
|||||||
|
|
||||||
public function __construct(private PDO $db) {}
|
public function __construct(private PDO $db) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper statique pour générer et appliquer toutes les configurations Asterisk.
|
||||||
|
*/
|
||||||
|
public static function generateAndApply(PDO $db): array
|
||||||
|
{
|
||||||
|
$generator = new self($db);
|
||||||
|
return $generator->writeAllConfigs();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Génère le contenu complet de /etc/asterisk/pjsip.custom.conf
|
* Génère le contenu complet de /etc/asterisk/pjsip.custom.conf
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in new issue
Block a user