Follow-up to3150f78, which over-corrected. Dropping `notice` from logger.conf made the log quiet by making the gateway undebuggable: Asterisk reports rejected SIP requests at notice level via log_failed_request ("No matching endpoint found", "Failed to authenticate"), and on a box whose entire job is answering SIP those are the most useful lines it produces. A call was refused and nothing said so. `notice` is restored. The noise is dealt with where it originates instead: - modules.conf, new. The image ships `autoload=yes` and loads every module it was built with, including chan_alsa on a container with no sound card: ~74 ALSA config errors per restart, plus module-load ERRORs for CDR/CEL backends, LDAP/ODBC realtime config, and format_ogg_vorbis — none of which can work here. Explicit noload for those; autoload stays on, because an allow-list would break quietly the first time a scenario needs a module nobody remembered to add. - The healthcheck reduction from3150f78(one CLI connection on a 60s interval, rather than the image's ~7 every 30s) does the rest. Verified on galatea: ALSA lines 74 → 0, all startup ERRORs gone (only one-off benign WARNINGs remain), steady-state 4 lines per 2 minutes against ~840 per 30 minutes originally — and a refused call still logs 6 diagnostic lines. Transport bound, both endpoints and dialplan loaded, container healthy. `verbose` stays excluded: dialplan execution is worth having when tracing a specific call, not worth shipping to Loki continuously. Raise it at runtime with `asterisk -rx "core set verbose 3"`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
31 lines
1.6 KiB
Plaintext
31 lines
1.6 KiB
Plaintext
; Log to stdout only — Docker's json-file driver captures it and the host
|
|
; Alloy ships it to Loki as job=<compose project>. Writing to a file inside
|
|
; the container would put the logs where nothing can see them.
|
|
[general]
|
|
dateformat = %F %T
|
|
; Colour is disabled in asterisk.conf (`nocolor = yes`), not here — Asterisk
|
|
; colourises the console by default and the escape codes travel through Docker
|
|
; into Loki, where every line arrives wrapped in \x1b[0;30m. That file must be
|
|
; mounted for the setting to take effect.
|
|
|
|
[logfiles]
|
|
; `notice` is KEPT, deliberately. Asterisk logs rejected SIP requests at
|
|
; notice level via log_failed_request ("No matching endpoint found",
|
|
; "Failed to authenticate"), and on a box whose whole job is answering SIP
|
|
; those are the single most useful diagnostic. Dropping notice made the log
|
|
; quieter and the gateway undebuggable — a call was refused and nothing said
|
|
; so.
|
|
;
|
|
; `verbose` is excluded: dialplan execution ("Executing [1001@...]") is
|
|
; useful when tracing a specific call, but it is not worth shipping to Loki
|
|
; continuously. Raise it at runtime instead:
|
|
; asterisk -rx "core set verbose 3"
|
|
;
|
|
; The healthcheck's "Remote UNIX connection" pairs also arrive on notice.
|
|
; They are dealt with at the source rather than by silencing the channel:
|
|
; docker-compose replaces the image's ~7-connections-per-30s healthcheck with
|
|
; a single check on a 60s interval, and modules.conf stops the container
|
|
; loading hardware and database modules it has no use for (~74 ALSA lines per
|
|
; restart). Those two together cut the noise without costing visibility.
|
|
console => notice,warning,error
|