Place the message after one proven route and trunk sequence
First preserve the dialed digits, caller, selected outbound route, attempted trunks in order, each Dial result, final SIP response and Asterisk channel outcome. A congestion announcement is a summary delivered after the attempt path; it is not proof that the carrier lacked circuits, the trunk was registered, the number pattern matched correctly or every configured trunk was tried.
Use the all-circuits-busy diagnostic when the audible message is the symptom. Correct the route or trunk evidence before changing the message that describes its failure.
Separate default, intra-company and emergency route classes
The reviewed release/17.0 source generates distinct selections for the default path, an intra-company route and an emergency route. Confirm which route actually matched and which route-class flag reached the failure branch before expecting a particular recording or tone. A label, route position or saved checkbox does not prove that the live call entered that class.
Treat emergency behavior as a safety boundary. Do not place an unapproved emergency test call merely to hear a prompt. Confirm current carrier, location and fallback requirements, keep accessible alternatives available, and use the provider-approved validation process.
Keep the module prompt separate from the route congestion destination
FreePBX core exposes an optional congestion destination on an outbound route, while Route Congestion Messages generates the macro-outisbusy failure treatment. Record both controls separately: the route selected by the call, whether that route has an alternate congestion destination, and which generated message branch remains reachable.
Do not assume that changing the module-wide prompt overrides a route-specific alternate destination, or that a route destination proves which recording played. Preserve the actual dialplan branch and the final channel path.
Trace the selected recording into generated and loaded dialplan
The module can use its default all-circuits-busy and try-later prompts, a selected System Recording, or congestion tones. Keep the System Recording identity and media files separate from the module selection, generated macro-outisbusy lines, loaded Asterisk dialplan, Playback status and what the caller heard.
The reviewed source resolves a selected recording through FreePBX recording data and falls back to the default when the resulting file value is empty. A visible selection therefore does not prove that the referenced media exists, decodes on the channel or was loaded after Apply Config.
Preserve DIALSTATUS, HANGUPCAUSE and the original SIP result
Capture DIALSTATUS, per-channel HANGUPCAUSE, the technology-specific cause and the original SIP final response before the prompt, congestion application or final Hangup replaces the caller-facing experience. Use Asterisk cause mappings as interpretation aids, not as a guarantee that every provider maps the same response or supplies the same Reason header.
Keep a route-selection failure, trunk rejection, authentication failure, no response, busy destination and local resource failure separate even if callers hear the same message. The prompt should remain useful and neutral without concealing the evidence needed to diagnose the underlying condition.
Retest a bounded failure matrix and preserve rollback
After one evidenced change, retest an authorized non-emergency number for the default class and, only where applicable, a controlled intra-company route. Prove the selected route, attempted trunks, original result, expected fallback branch, selected recording or tone, intelligible audio and clean release. Test the successful-call path separately so the failure treatment cannot intercept valid calls.
Record the prior module selection, route destination, System Recording reference and generated output for rollback. This workflow is derived from first-party source and documentation; no PBX, module, route, trunk, recording, call or emergency service was inspected or tested.
Sources & applicability
Primary references for the technical details above. Operational examples and planning checklists are VoIP.info editorial guidance.
- FreePBX Route Congestion Messages repository ↗
- FreePBX Route Congestion Messages metadata — release/17.0 ↗
- FreePBX Route Congestion Messages generated dialplan — release/17.0 ↗
- FreePBX core outbound-routing component — release/17.0 ↗
- Sangoma Sample Route Configurations ↗
- Sangoma System Recordings ↗
- Asterisk Dial application ↗
- Asterisk Hangup Cause ↗
- Asterisk Hangup Cause Mappings ↗
- Asterisk Playback application ↗
Examples require adaptation to your topology. No live PBX or hardware testing is claimed.