[mod_sofia] Add SIP 603+ detection and passthrough control. Add unit-tests. (#3035)

Implement SIP 603+ (ATIS-1000099) support for FCC analytics-based call blocking compliance.

Detection:
- Detect incoming 603+ responses by checking "Network Blocked" phrase
and "v=analytics1;" in the `Reason` header text
- Set `sip_603plus_reason` channel variable on both legs for CDR visibility

Passthrough control:
- `sip_603plus_passthrough=true`: forward 603+ phrase and Reason header
- `sip_603plus_passthrough=false`: strip `Reason` header, send clean `603 Decline`
- Not set: existing behavior preserved
- Works independently of `disable_q850_reason` for selective forwarding
This commit is contained in:
Dmitry Verenitsin
2026-05-26 19:33:23 +05:00
committed by GitHub
parent bcd9d82630
commit 9da537a19f
6 changed files with 626 additions and 2 deletions
+7
View File
@@ -430,4 +430,11 @@
<X-PRE-PROCESS cmd="set" data="video_mute_png=$${images_dir}/default-mute.png"/>
<X-PRE-PROCESS cmd="set" data="video_no_avatar_png=$${images_dir}/default-avatar.png"/>
<!-- SIP 603+ call blocking passthrough control.
true: Forward "Network Blocked" phrase and Reason header to the caller.
false: Strip Reason header, send clean 603 Decline.
unset: Default behavior (Reason passes through, phrase reset to "Decline").
Works independently of disable_q850_reason for selective 603+ forwarding. -->
<!--<Z-PRE-PROCESS cmd="set" data="sip_603plus_passthrough=true"/>-->
</include>