Add Asterisk configuration and diagnostics support
- Updated .env.example to include Asterisk templates path. - Modified docker-compose.yml to mount the templates directory. - Enhanced backend Dockerfile to copy templates into the container. - Introduced Asterisk diagnostics functionality in asterisk_profiles.py, allowing for baseline checks and diagnostics reporting. - Integrated Asterisk diagnostics into the device diagnostics workflow in graph.py. - Added formatting for Asterisk baseline drift reports in diagnostic_format.py. - Updated SKILL.md to document new config baseline drift feature for Asterisk. This commit enhances the system's capabilities for managing Asterisk configurations and diagnostics, improving overall troubleshooting processes.
This commit is contained in:
42
templates/asterisk/geneseasx/manifest.yaml
Normal file
42
templates/asterisk/geneseasx/manifest.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
# GeneseasX Asterisk golden config baseline
|
||||
# Used by asterisk_baseline.py to compare live container config on task runs.
|
||||
#
|
||||
# Variables use {{NAME}} placeholders — resolved from:
|
||||
# 1. This file (defaults)
|
||||
# 2. Env ASTERISK_BASELINE_<NAME> (e.g. ASTERISK_BASELINE_ASTERISK_IP)
|
||||
# 3. Per-vessel device metadata (future UI fields)
|
||||
|
||||
profile: geneseasx
|
||||
catalog_keys:
|
||||
- asterisk_geneseasx
|
||||
- asterisk
|
||||
|
||||
variables:
|
||||
ASTERISK_IP: "10.20.30.222"
|
||||
PHONE_SUBNET: "192.168.0.0/24"
|
||||
VOIP_SUBNET: "10.20.30.0/24"
|
||||
RTP_START: "10000"
|
||||
RTP_END: "10029"
|
||||
|
||||
config_root: /etc/asterisk
|
||||
|
||||
files:
|
||||
- path: pjsip.conf
|
||||
description: PJSIP NAT / SDP — critical for registration and one-way audio
|
||||
required_lines:
|
||||
- "local_net={{PHONE_SUBNET}}"
|
||||
- "local_net={{VOIP_SUBNET}}"
|
||||
- "external_media_address={{ASTERISK_IP}}"
|
||||
- "external_signaling_address={{ASTERISK_IP}}"
|
||||
|
||||
- path: rtp.conf
|
||||
description: RTP port range — must align with pfSense pass rules (UDP 10000-10029)
|
||||
required_lines:
|
||||
- "rtpstart={{RTP_START}}"
|
||||
- "rtpend={{RTP_END}}"
|
||||
|
||||
- path: extensions.conf
|
||||
description: Dialplan — trunk patterns and internal routing
|
||||
required_substrings:
|
||||
- "[public]"
|
||||
- "exten => _7"
|
||||
13
templates/asterisk/geneseasx/pjsip.conf.snippet
Normal file
13
templates/asterisk/geneseasx/pjsip.conf.snippet
Normal file
@@ -0,0 +1,13 @@
|
||||
; Golden reference snippet — GeneseasX Asterisk PJSIP (not executed; for human review).
|
||||
; Live checks use manifest.yaml required_lines against /etc/asterisk/pjsip.conf in container.
|
||||
|
||||
[transport-udp]
|
||||
type=transport
|
||||
protocol=udp
|
||||
bind=0.0.0.0:5060
|
||||
local_net={{PHONE_SUBNET}}
|
||||
local_net={{VOIP_SUBNET}}
|
||||
external_media_address={{ASTERISK_IP}}
|
||||
external_signaling_address={{ASTERISK_IP}}
|
||||
|
||||
; Endpoint includes vary by vessel — verify local_net on transport and per-endpoint if used.
|
||||
Reference in New Issue
Block a user