Compare commits
2
Commits
e2af2c34c9
...
v1.3.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8c25309e3 | ||
|
|
e6540c866b |
No files matched your search
+3
-2
@@ -187,7 +187,7 @@ setfacl -R -d -m u:www-data:rwx,g:asterisk:rwx /etc/asterisk /var/lib/asterisk/s
|
|||||||
# Droits sudoers pour l'interface web (www-data)
|
# Droits sudoers pour l'interface web (www-data)
|
||||||
cat << 'EOF' > /etc/sudoers.d/nexus-pbx
|
cat << 'EOF' > /etc/sudoers.d/nexus-pbx
|
||||||
# Privilèges spécifiques NexusPBX pour l'utilisateur Web www-data
|
# Privilèges spécifiques NexusPBX pour l'utilisateur Web www-data
|
||||||
www-data ALL=(ALL) NOPASSWD: /usr/sbin/asterisk, /usr/sbin/nginx, /usr/bin/systemctl, /usr/bin/fail2ban-client, /bin/fail2ban-client, /var/www/nexus-pbx/scripts/nexus-firewall, /usr/bin/certbot, /usr/sbin/nft, /usr/sbin/iptables
|
www-data ALL=(ALL) NOPASSWD: /usr/sbin/asterisk, /usr/sbin/nginx, /usr/bin/systemctl, /usr/bin/fail2ban-client, /bin/fail2ban-client, /var/www/nexus-pbx/scripts/nexus-firewall, /usr/bin/certbot, /usr/sbin/nft, /usr/sbin/iptables, /var/www/nexus-pbx/scripts/update.sh, /usr/local/bin/nexus-update
|
||||||
EOF
|
EOF
|
||||||
chmod 0440 /etc/sudoers.d/nexus-pbx
|
chmod 0440 /etc/sudoers.d/nexus-pbx
|
||||||
|
|
||||||
@@ -425,9 +425,10 @@ chmod 0644 /etc/cron.d/nexus-backup
|
|||||||
touch /var/log/nexus_backup.log && chown www-data:asterisk /var/log/nexus_backup.log && chmod 664 /var/log/nexus_backup.log
|
touch /var/log/nexus_backup.log && chown www-data:asterisk /var/log/nexus_backup.log && chmod 664 /var/log/nexus_backup.log
|
||||||
|
|
||||||
# CLI symlinks
|
# CLI symlinks
|
||||||
chmod +x "$TARGET_DIR/scripts/nexus-firewall" "$TARGET_DIR/scripts/nexus-banner.sh"
|
chmod +x "$TARGET_DIR/scripts/nexus-firewall" "$TARGET_DIR/scripts/nexus-banner.sh" "$TARGET_DIR/scripts/update.sh"
|
||||||
ln -sf "$TARGET_DIR/scripts/nexus-firewall" /usr/local/bin/nexus-firewall
|
ln -sf "$TARGET_DIR/scripts/nexus-firewall" /usr/local/bin/nexus-firewall
|
||||||
ln -sf "$TARGET_DIR/scripts/nexus-banner.sh" /usr/local/bin/nexus-banner
|
ln -sf "$TARGET_DIR/scripts/nexus-banner.sh" /usr/local/bin/nexus-banner
|
||||||
|
ln -sf "$TARGET_DIR/scripts/update.sh" /usr/local/bin/nexus-update
|
||||||
|
|
||||||
# Bannière interactive lors de chaque connexion terminal (SSH / Console)
|
# Bannière interactive lors de chaque connexion terminal (SSH / Console)
|
||||||
cat << 'EOF' > /etc/profile.d/nexus-motd.sh
|
cat << 'EOF' > /etc/profile.d/nexus-motd.sh
|
||||||
|
|||||||
+1
-1
@@ -1126,7 +1126,7 @@ try {
|
|||||||
$inband_progress = (int)!empty($payload['inband_progress']);
|
$inband_progress = (int)!empty($payload['inband_progress']);
|
||||||
$match_ips = trim((string)($payload['match_ips'] ?? ''));
|
$match_ips = trim((string)($payload['match_ips'] ?? ''));
|
||||||
$context = preg_replace('/[^a-zA-Z0-9_\-]/', '', trim((string)($payload['context'] ?? 'from-external'))) ?: 'from-external';
|
$context = preg_replace('/[^a-zA-Z0-9_\-]/', '', trim((string)($payload['context'] ?? 'from-external'))) ?: 'from-external';
|
||||||
$inbound_dest = trim((string)($payload['inbound_dest'] ?? 'ivr-accueil')) ?: 'hangup';
|
$inbound_dest = trim((string)($payload['inbound_dest'] ?? 'terminate-hangup')) ?: 'terminate-hangup';
|
||||||
$outbound_prefix = preg_replace('/[^0-9*#X._\[\]\-+]/', '', trim((string)($payload['outbound_prefix'] ?? '')));
|
$outbound_prefix = preg_replace('/[^0-9*#X._\[\]\-+]/', '', trim((string)($payload['outbound_prefix'] ?? '')));
|
||||||
$custom_endpoint_params = trim((string)($payload['custom_endpoint_params'] ?? ''));
|
$custom_endpoint_params = trim((string)($payload['custom_endpoint_params'] ?? ''));
|
||||||
$custom_reg_params = trim((string)($payload['custom_reg_params'] ?? ''));
|
$custom_reg_params = trim((string)($payload['custom_reg_params'] ?? ''));
|
||||||
|
|||||||
@@ -3003,7 +3003,7 @@ function openIvrModal(ivr = null) {
|
|||||||
document.getElementById('modal-ivr-title').textContent = ivr ? `Modifier le SVI « ${ivr.name} »` : 'Nouveau Serveur Vocal Interactif (SVI / IVR)';
|
document.getElementById('modal-ivr-title').textContent = ivr ? `Modifier le SVI « ${ivr.name} »` : 'Nouveau Serveur Vocal Interactif (SVI / IVR)';
|
||||||
|
|
||||||
form.elements['id'].value = ivr ? ivr.id : '';
|
form.elements['id'].value = ivr ? ivr.id : '';
|
||||||
form.elements['name'].value = ivr ? ivr.name : 'ivr-accueil';
|
form.elements['name'].value = ivr ? ivr.name : '';
|
||||||
form.elements['description'].value = ivr && ivr.description ? ivr.description : '';
|
form.elements['description'].value = ivr && ivr.description ? ivr.description : '';
|
||||||
form.elements['timeout'].value = ivr ? Number(ivr.timeout) : 5;
|
form.elements['timeout'].value = ivr ? Number(ivr.timeout) : 5;
|
||||||
form.elements['timeout_retries'].value = ivr ? Number(ivr.timeout_retries || 2) : 2;
|
form.elements['timeout_retries'].value = ivr ? Number(ivr.timeout_retries || 2) : 2;
|
||||||
|
|||||||
+1
-1
@@ -85,7 +85,7 @@ chmod 0664 /etc/fail2ban/jail.local /etc/nginx/sites-available/nexus-pbx 2>/dev/
|
|||||||
setfacl -m u:www-data:rw /etc/fail2ban/jail.local /etc/nginx/sites-available/nexus-pbx 2>/dev/null || true
|
setfacl -m u:www-data:rw /etc/fail2ban/jail.local /etc/nginx/sites-available/nexus-pbx 2>/dev/null || true
|
||||||
|
|
||||||
cat << 'EOF' > /etc/sudoers.d/nexus-pbx
|
cat << 'EOF' > /etc/sudoers.d/nexus-pbx
|
||||||
www-data ALL=(ALL) NOPASSWD: /usr/sbin/asterisk, /usr/sbin/nginx, /usr/bin/systemctl, /usr/bin/fail2ban-client, /bin/fail2ban-client, /var/www/nexus-pbx/scripts/nexus-firewall, /usr/bin/certbot, /usr/sbin/nft, /usr/sbin/iptables
|
www-data ALL=(ALL) NOPASSWD: /usr/sbin/asterisk, /usr/sbin/nginx, /usr/bin/systemctl, /usr/bin/fail2ban-client, /bin/fail2ban-client, /var/www/nexus-pbx/scripts/nexus-firewall, /usr/bin/certbot, /usr/sbin/nft, /usr/sbin/iptables, /var/www/nexus-pbx/scripts/update.sh, /usr/local/bin/nexus-update
|
||||||
EOF
|
EOF
|
||||||
chmod 0440 /etc/sudoers.d/nexus-pbx
|
chmod 0440 /etc/sudoers.d/nexus-pbx
|
||||||
|
|
||||||
|
|||||||
@@ -95,6 +95,16 @@ echo -e "${C_GRAY}[2/6] Déploiement des nouveaux fichiers de code...${C_RESET}"
|
|||||||
git reset --hard "${GIT_REMOTE}/${GIT_BRANCH}"
|
git reset --hard "${GIT_REMOTE}/${GIT_BRANCH}"
|
||||||
chown -R www-data:asterisk "$APP_DIR"
|
chown -R www-data:asterisk "$APP_DIR"
|
||||||
chmod 2775 "$APP_DIR/storage" "$APP_DIR/storage/backups" "$APP_DIR/storage/sounds" 2>/dev/null || true
|
chmod 2775 "$APP_DIR/storage" "$APP_DIR/storage/backups" "$APP_DIR/storage/sounds" 2>/dev/null || true
|
||||||
|
chmod +x "$APP_DIR/scripts/update.sh" "$APP_DIR/scripts/nexus-firewall" "$APP_DIR/scripts/nexus-banner.sh" 2>/dev/null || true
|
||||||
|
ln -sf "$APP_DIR/scripts/update.sh" /usr/local/bin/nexus-update
|
||||||
|
ln -sf "$APP_DIR/scripts/nexus-firewall" /usr/local/bin/nexus-firewall
|
||||||
|
ln -sf "$APP_DIR/scripts/nexus-banner.sh" /usr/local/bin/nexus-banner
|
||||||
|
|
||||||
|
# Mise à jour des privilèges sudoers (www-data)
|
||||||
|
cat << 'EOF_SUDO' > /etc/sudoers.d/nexus-pbx
|
||||||
|
www-data ALL=(ALL) NOPASSWD: /usr/sbin/asterisk, /usr/sbin/nginx, /usr/bin/systemctl, /usr/bin/fail2ban-client, /bin/fail2ban-client, /var/www/nexus-pbx/scripts/nexus-firewall, /usr/bin/certbot, /usr/sbin/nft, /usr/sbin/iptables, /var/www/nexus-pbx/scripts/update.sh, /usr/local/bin/nexus-update
|
||||||
|
EOF_SUDO
|
||||||
|
chmod 0440 /etc/sudoers.d/nexus-pbx
|
||||||
|
|
||||||
# 3. Vérification des dépendances Debian
|
# 3. Vérification des dépendances Debian
|
||||||
echo -e "${C_GRAY}[3/6] Vérification des composants et outils système...${C_RESET}"
|
echo -e "${C_GRAY}[3/6] Vérification des composants et outils système...${C_RESET}"
|
||||||
|
|||||||
+6
-230
@@ -159,7 +159,7 @@ class Database
|
|||||||
max_channels INTEGER NOT NULL DEFAULT 0,
|
max_channels INTEGER NOT NULL DEFAULT 0,
|
||||||
match_ips TEXT NOT NULL DEFAULT '',
|
match_ips TEXT NOT NULL DEFAULT '',
|
||||||
context VARCHAR(64) NOT NULL DEFAULT 'from-external',
|
context VARCHAR(64) NOT NULL DEFAULT 'from-external',
|
||||||
inbound_dest VARCHAR(64) NOT NULL DEFAULT 'ivr-accueil',
|
inbound_dest VARCHAR(64) NOT NULL DEFAULT 'terminate-hangup',
|
||||||
did_routes_json TEXT NOT NULL DEFAULT '{}',
|
did_routes_json TEXT NOT NULL DEFAULT '{}',
|
||||||
outbound_prefix VARCHAR(32) NOT NULL DEFAULT '',
|
outbound_prefix VARCHAR(32) NOT NULL DEFAULT '',
|
||||||
custom_endpoint_params TEXT NOT NULL DEFAULT '',
|
custom_endpoint_params TEXT NOT NULL DEFAULT '',
|
||||||
@@ -331,61 +331,6 @@ class Database
|
|||||||
':p' => password_hash('admin123', PASSWORD_DEFAULT),
|
':p' => password_hash('admin123', PASSWORD_DEFAULT),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Données de démonstration initiales si la table extensions est vide
|
|
||||||
$extCount = (int)$db->query('SELECT COUNT(*) FROM extensions')->fetchColumn();
|
|
||||||
if ($extCount === 0) {
|
|
||||||
$stmtExt = $db->prepare('
|
|
||||||
INSERT INTO extensions (extension, name, secret, transport, encryption, codecs, max_contacts, enabled)
|
|
||||||
VALUES (:ext, :name, :secret, :transport, :encryption, :codecs, :max_contacts, 1)
|
|
||||||
');
|
|
||||||
$stmtExt->execute([
|
|
||||||
':ext' => '101',
|
|
||||||
':name' => 'Accueil Bureau (LAN)',
|
|
||||||
':secret' => 'LanPass101!Sip',
|
|
||||||
':transport' => 'udp',
|
|
||||||
':encryption' => 0,
|
|
||||||
':codecs' => 'alaw,ulaw,g722',
|
|
||||||
':max_contacts' => 2,
|
|
||||||
]);
|
|
||||||
$stmtExt->execute([
|
|
||||||
':ext' => '102',
|
|
||||||
':name' => 'Direction Nomade (TLS/SRTP)',
|
|
||||||
':secret' => 'TlsSecure102!Sip',
|
|
||||||
':transport' => 'tls',
|
|
||||||
':encryption' => 1,
|
|
||||||
':codecs' => 'opus,g722,alaw',
|
|
||||||
':max_contacts' => 3,
|
|
||||||
]);
|
|
||||||
|
|
||||||
$stmtGrp = $db->prepare('
|
|
||||||
INSERT INTO groups (extension, name, strategy, ring_time, members, failover_dest)
|
|
||||||
VALUES (:ext, :name, :strategy, :ring_time, :members, :failover)
|
|
||||||
');
|
|
||||||
$stmtGrp->execute([
|
|
||||||
':ext' => '600',
|
|
||||||
':name' => 'Support Général',
|
|
||||||
':strategy' => 'ringall',
|
|
||||||
':ring_time' => 25,
|
|
||||||
':members' => json_encode(['101', '102']),
|
|
||||||
':failover' => 'hangup',
|
|
||||||
]);
|
|
||||||
|
|
||||||
$stmtIvr = $db->prepare('
|
|
||||||
INSERT INTO ivrs (name, audio_file, timeout, options_json)
|
|
||||||
VALUES (:name, :audio, :timeout, :options)
|
|
||||||
');
|
|
||||||
$stmtIvr->execute([
|
|
||||||
':name' => 'ivr-accueil',
|
|
||||||
':audio' => 'custom/bienvenue-entreprise',
|
|
||||||
':timeout' => 5,
|
|
||||||
':options' => json_encode([
|
|
||||||
'1' => 'ext-101',
|
|
||||||
'2' => 'grp-600',
|
|
||||||
'0' => 'ext-102',
|
|
||||||
]),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function migrateSettingsTable(PDO $db): void
|
private static function migrateSettingsTable(PDO $db): void
|
||||||
@@ -539,7 +484,7 @@ class Database
|
|||||||
max_channels INTEGER NOT NULL DEFAULT 0,
|
max_channels INTEGER NOT NULL DEFAULT 0,
|
||||||
match_ips TEXT NOT NULL DEFAULT '',
|
match_ips TEXT NOT NULL DEFAULT '',
|
||||||
context VARCHAR(64) NOT NULL DEFAULT 'from-external',
|
context VARCHAR(64) NOT NULL DEFAULT 'from-external',
|
||||||
inbound_dest VARCHAR(64) NOT NULL DEFAULT 'ivr-accueil',
|
inbound_dest VARCHAR(64) NOT NULL DEFAULT 'terminate-hangup',
|
||||||
did_routes_json TEXT NOT NULL DEFAULT '{}',
|
did_routes_json TEXT NOT NULL DEFAULT '{}',
|
||||||
outbound_prefix VARCHAR(32) NOT NULL DEFAULT '',
|
outbound_prefix VARCHAR(32) NOT NULL DEFAULT '',
|
||||||
custom_endpoint_params TEXT NOT NULL DEFAULT '',
|
custom_endpoint_params TEXT NOT NULL DEFAULT '',
|
||||||
@@ -594,166 +539,17 @@ class Database
|
|||||||
|
|
||||||
private static function migrateOutboundRoutesTable(PDO $db): void
|
private static function migrateOutboundRoutesTable(PDO $db): void
|
||||||
{
|
{
|
||||||
$count = (int)$db->query('SELECT COUNT(*) FROM outbound_routes')->fetchColumn();
|
// Aucun enregistrement de démonstration auto-injecté pour conserver une base propre
|
||||||
if ($count === 0) {
|
|
||||||
// Vérifie quels trunks et postes existent déjà pour pré-initialiser la route sortante principale
|
|
||||||
$trunks = $db->query('SELECT name, outbound_callerid FROM trunks ORDER BY id ASC')->fetchAll();
|
|
||||||
$firstTrunkName = !empty($trunks) ? (string)$trunks[0]['name'] : 'ovh-telecom';
|
|
||||||
$firstTrunkCid = !empty($trunks) && trim((string)$trunks[0]['outbound_callerid']) !== ''
|
|
||||||
? trim((string)$trunks[0]['outbound_callerid'])
|
|
||||||
: 'Mon Entreprise <0123456789>';
|
|
||||||
|
|
||||||
$exts = $db->query('SELECT extension FROM extensions ORDER BY CAST(extension AS INTEGER) ASC')->fetchAll(PDO::FETCH_COLUMN);
|
|
||||||
$grps = $db->query('SELECT extension FROM groups ORDER BY CAST(extension AS INTEGER) ASC')->fetchAll(PDO::FETCH_COLUMN);
|
|
||||||
|
|
||||||
$stmt = $db->prepare('
|
|
||||||
INSERT INTO outbound_routes (
|
|
||||||
priority, name, outbound_callerid, override_ext_cid, route_password,
|
|
||||||
route_type, moh_class, trunk_sequence_json, dial_patterns_json,
|
|
||||||
permission_mode, allowed_groups_json, allowed_extensions_json,
|
|
||||||
continue_next_route, congestion_dest, record_mode, enabled
|
|
||||||
) VALUES (
|
|
||||||
:priority, :name, :cid, :override_cid, :pwd,
|
|
||||||
:rtype, :moh, :trunks, :patterns,
|
|
||||||
:pmode, :agroups, :aexts,
|
|
||||||
:cont, :cdest, :rec, 1
|
|
||||||
)
|
|
||||||
');
|
|
||||||
|
|
||||||
// Route 1 : OVH (principale)
|
|
||||||
$stmt->execute([
|
|
||||||
':priority' => 1,
|
|
||||||
':name' => 'OVH',
|
|
||||||
':cid' => $firstTrunkCid,
|
|
||||||
':override_cid' => 0,
|
|
||||||
':pwd' => '',
|
|
||||||
':rtype' => 'normal',
|
|
||||||
':moh' => 'default',
|
|
||||||
':trunks' => json_encode([$firstTrunkName]),
|
|
||||||
':patterns' => json_encode([
|
|
||||||
['prepend' => '', 'prefix' => '', 'match_pattern' => '0[1-59]XXXXXXXX', 'callerid' => ''],
|
|
||||||
['prepend' => '', 'prefix' => '', 'match_pattern' => '0[67]XXXXXXXX', 'callerid' => ''],
|
|
||||||
['prepend' => '', 'prefix' => '', 'match_pattern' => '080[0-9]XXXXXX', 'callerid' => ''],
|
|
||||||
]),
|
|
||||||
':pmode' => 'all',
|
|
||||||
':agroups' => json_encode($grps),
|
|
||||||
':aexts' => json_encode($exts),
|
|
||||||
':cont' => 1,
|
|
||||||
':cdest' => 'all-circuits-busy',
|
|
||||||
':rec' => 'dontcare',
|
|
||||||
]);
|
|
||||||
|
|
||||||
// Route 2 : Emergency (Numéros d'urgence)
|
|
||||||
$stmt->execute([
|
|
||||||
':priority' => 2,
|
|
||||||
':name' => 'Emergency',
|
|
||||||
':cid' => $firstTrunkCid,
|
|
||||||
':override_cid' => 1,
|
|
||||||
':pwd' => '',
|
|
||||||
':rtype' => 'emergency',
|
|
||||||
':moh' => 'default',
|
|
||||||
':trunks' => json_encode([$firstTrunkName]),
|
|
||||||
':patterns' => json_encode([
|
|
||||||
['prepend' => '', 'prefix' => '', 'match_pattern' => '15', 'callerid' => ''],
|
|
||||||
['prepend' => '', 'prefix' => '', 'match_pattern' => '17', 'callerid' => ''],
|
|
||||||
['prepend' => '', 'prefix' => '', 'match_pattern' => '18', 'callerid' => ''],
|
|
||||||
['prepend' => '', 'prefix' => '', 'match_pattern' => '112', 'callerid' => ''],
|
|
||||||
['prepend' => '', 'prefix' => '', 'match_pattern' => '114', 'callerid' => ''],
|
|
||||||
]),
|
|
||||||
':pmode' => 'all',
|
|
||||||
':agroups' => json_encode($grps),
|
|
||||||
':aexts' => json_encode($exts),
|
|
||||||
':cont' => 1,
|
|
||||||
':cdest' => 'terminate-congestion',
|
|
||||||
':rec' => 'dontcare',
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function migrateExtensionGroupsTable(PDO $db): void
|
private static function migrateExtensionGroupsTable(PDO $db): void
|
||||||
{
|
{
|
||||||
$count = (int)$db->query('SELECT COUNT(*) FROM extension_groups')->fetchColumn();
|
// Aucun enregistrement de démonstration auto-injecté pour conserver une base propre
|
||||||
if ($count === 0) {
|
|
||||||
$stmt = $db->prepare('INSERT INTO extension_groups (name, description, color, members) VALUES (:n, :d, :c, :m)');
|
|
||||||
$stmt->execute([
|
|
||||||
':n' => 'Groupe Nice',
|
|
||||||
':d' => 'Extensions du site secondaire (Trunk passerelle locale)',
|
|
||||||
':c' => 'emerald',
|
|
||||||
':m' => json_encode(['101', '102']),
|
|
||||||
]);
|
|
||||||
$stmt->execute([
|
|
||||||
':n' => 'Groupe Paris',
|
|
||||||
':d' => 'Extensions du site de Paris (Trunk principal OVH)',
|
|
||||||
':c' => 'indigo',
|
|
||||||
':m' => json_encode(['103']),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function migrateSoundsTable(PDO $db): void
|
private static function migrateSoundsTable(PDO $db): void
|
||||||
{
|
{
|
||||||
$count = (int)$db->query('SELECT COUNT(*) FROM sounds')->fetchColumn();
|
// Aucun enregistrement de démonstration auto-injecté pour conserver une base propre
|
||||||
if ($count === 0) {
|
|
||||||
$stmt = $db->prepare('
|
|
||||||
INSERT INTO sounds (name, slug, site_category, usage_type, description, filename, original_filename, duration_sec, file_size, format)
|
|
||||||
VALUES (:name, :slug, :site, :usage, :desc, :file, :orig, :dur, :size, :fmt)
|
|
||||||
');
|
|
||||||
|
|
||||||
$demoSounds = [
|
|
||||||
[
|
|
||||||
':name' => 'Message d\'accueil SVI Standard',
|
|
||||||
':slug' => 'bienvenue-entreprise',
|
|
||||||
':site' => 'Global',
|
|
||||||
':usage' => 'ivr',
|
|
||||||
':desc' => 'Jingle d\'accueil principal du serveur vocal interactif',
|
|
||||||
':file' => 'bienvenue-entreprise.wav',
|
|
||||||
':orig' => 'bienvenue-entreprise.wav',
|
|
||||||
':dur' => 2,
|
|
||||||
':size' => 31800,
|
|
||||||
':fmt' => 'wav',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
':name' => 'Musique d\'attente Standard',
|
|
||||||
':slug' => 'attente-musicale-standard',
|
|
||||||
':site' => 'Global',
|
|
||||||
':usage' => 'moh',
|
|
||||||
':desc' => 'Mélodie douce d\'attente (MoH) par défaut pour les appels mis en garde',
|
|
||||||
':file' => 'attente-musicale-standard.wav',
|
|
||||||
':orig' => 'attente-musicale-standard.wav',
|
|
||||||
':dur' => 4,
|
|
||||||
':size' => 63600,
|
|
||||||
':fmt' => 'wav',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
':name' => 'Message Ligne Occupée & Congestion',
|
|
||||||
':slug' => 'ligne-occupee-congestion',
|
|
||||||
':site' => 'Global',
|
|
||||||
':usage' => 'congestion',
|
|
||||||
':desc' => 'Tonalité cadencée d\'occupation si aucun trunk ou poste n\'est disponible',
|
|
||||||
':file' => 'ligne-occupee-congestion.wav',
|
|
||||||
':orig' => 'ligne-occupee-congestion.wav',
|
|
||||||
':dur' => 1,
|
|
||||||
':size' => 16000,
|
|
||||||
':fmt' => 'wav',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
':name' => 'Annonce Fermeture Nice',
|
|
||||||
':slug' => 'annonce-fermeture-nice',
|
|
||||||
':site' => 'Site Nice',
|
|
||||||
':usage' => 'announcement',
|
|
||||||
':desc' => 'Message informant des horaires d\'ouverture du bureau de Nice',
|
|
||||||
':file' => 'annonce-fermeture-nice.wav',
|
|
||||||
':orig' => 'annonce-fermeture-nice.wav',
|
|
||||||
':dur' => 2,
|
|
||||||
':size' => 28800,
|
|
||||||
':fmt' => 'wav',
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
||||||
foreach ($demoSounds as $ds) {
|
|
||||||
$stmt->execute($ds);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function migrateSoundSitesTable(PDO $db): void
|
private static function migrateSoundSitesTable(PDO $db): void
|
||||||
@@ -762,8 +558,6 @@ class Database
|
|||||||
if ($count === 0) {
|
if ($count === 0) {
|
||||||
$stmt = $db->prepare('INSERT INTO sound_sites (name, description) VALUES (:n, :d)');
|
$stmt = $db->prepare('INSERT INTO sound_sites (name, description) VALUES (:n, :d)');
|
||||||
$stmt->execute([':n' => 'Global', ':d' => 'Fichiers généraux partagés par tout le PBX']);
|
$stmt->execute([':n' => 'Global', ':d' => 'Fichiers généraux partagés par tout le PBX']);
|
||||||
$stmt->execute([':n' => 'Site Nice', ':d' => 'Annonces et musiques spécifiques au site de Nice']);
|
|
||||||
$stmt->execute([':n' => 'Site Paris', ':d' => 'Annonces et musiques spécifiques au site de Paris']);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -954,25 +748,7 @@ class Database
|
|||||||
);
|
);
|
||||||
");
|
");
|
||||||
|
|
||||||
$count = (int)$db->query('SELECT COUNT(*) FROM paging_groups')->fetchColumn();
|
// Aucun groupe de paging par défaut pour conserver une base propre
|
||||||
if ($count === 0) {
|
|
||||||
$exts = $db->query('SELECT extension FROM extensions ORDER BY CAST(extension AS INTEGER) ASC')->fetchAll(PDO::FETCH_COLUMN);
|
|
||||||
$members = !empty($exts) ? $exts : ['101', '102'];
|
|
||||||
$stmt = $db->prepare('
|
|
||||||
INSERT INTO paging_groups (extension, name, description, members, duplex, busy_mode, play_beep, timeout, enabled)
|
|
||||||
VALUES (:ext, :name, :desc, :members, :duplex, :busy_mode, :play_beep, :timeout, 1)
|
|
||||||
');
|
|
||||||
$stmt->execute([
|
|
||||||
':ext' => '100',
|
|
||||||
':name' => 'Téléavertissement Général',
|
|
||||||
':desc' => 'Diffusion générale sur haut-parleur de tous les postes',
|
|
||||||
':members' => json_encode($members),
|
|
||||||
':duplex' => 0,
|
|
||||||
':busy_mode' => 'skip',
|
|
||||||
':play_beep' => 1,
|
|
||||||
':timeout' => 120,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,6 +110,8 @@ class PhonebookManager
|
|||||||
if (!empty($activeExtIds)) {
|
if (!empty($activeExtIds)) {
|
||||||
$inClause = implode(',', $activeExtIds);
|
$inClause = implode(',', $activeExtIds);
|
||||||
$db->exec("DELETE FROM phonebook_contacts WHERE is_internal = 1 AND extension_id IS NOT NULL AND extension_id NOT IN ({$inClause})");
|
$db->exec("DELETE FROM phonebook_contacts WHERE is_internal = 1 AND extension_id IS NOT NULL AND extension_id NOT IN ({$inClause})");
|
||||||
|
} else {
|
||||||
|
$db->exec("DELETE FROM phonebook_contacts WHERE is_internal = 1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-6
@@ -1,13 +1,12 @@
|
|||||||
{
|
{
|
||||||
"version": "1.3.1",
|
"version": "1.3.3",
|
||||||
"codename": "Helios",
|
"codename": "Helios",
|
||||||
"release_date": "2026-11-04",
|
"release_date": "2026-11-04",
|
||||||
"min_php_version": "8.2",
|
"min_php_version": "8.2",
|
||||||
"changelog": [
|
"changelog": [
|
||||||
"Badge de notification automatique de mise à jour dans l'en-tête (à côté du test AMI)",
|
"Autorisation sudoers www-data automatique pour les mises à jour 1-clic depuis l'interface Web",
|
||||||
"Vérification intelligente en tâche de fond toutes les 24h sans solliciter le serveur",
|
"Création systématique du lien symbolique CLI nexus-update à l'installation et à la mise à jour",
|
||||||
"Accès direct 1-clic aux détails et à l'installation des mises à jour",
|
"Suppression complète des données de démonstration au déploiement (base 100% propre)",
|
||||||
"Gestion avancée des passerelles analogiques / FXO (Grandstream HT813, Cisco SPA)",
|
"Résolution du bug de réapparition intempestive des postes, groupes, IVR, paging et routes supprimés"
|
||||||
"Message vocal d'indisponibilité / congestion configurable sur les routes sortantes"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user