SBC Trunk Management
1. SBC Trunk Metadata
SBC extends the following metadata for each SIP trunk (stored in the sip_trunk.metadata.sbc JSON field):
1.1 Media Control
| Setting | Description | Options |
|---|---|---|
| media_mode | Media proxy mode | all, auto, nat, none, bypass |
| video_policy | Video policy | passthrough, strip, transcode |
media_mode details:
| Mode | Behavior |
|---|---|
all | Always proxy media, all RTP passes through SBC |
auto | Smart detection (default), proxy when needed |
nat | Proxy only for NAT scenarios |
none | Do not proxy media |
bypass | Only rewrite IP in SDP, RTP flows directly |
1.2 Codec Control
{
"sbc": {
"codec_allow": ["pcmu", "pcma", "g729"],
"codec_deny": [],
"codec_prefer": "pcmu"
}
}
1.3 CAC (Call Admission Control)
{
"sbc": {
"cac_max_calls": 100,
"cac_max_cps": 20
}
}
1.4 Recording Policy
{
"sbc": {
"recording": {
"enabled": true,
"direction": "both"
}
}
}
1.5 Header Manipulation Rules
Add, remove, or modify headers on SIP signaling passing through this trunk:
{
"sbc": {
"header_rules": [
{ "action": "add", "name": "X-Gateway", "value": "sbc-01" },
{ "action": "set", "name": "P-Asserted-Identity", "value": "${caller}" },
{ "action": "remove", "name": "X-Internal-IP" }
]
}
}
1.6 Source IP Control
{
"sbc": {
"source_ips": ["203.0.113.0/24", "198.51.100.10"]
}
}
2. Batch Configuration
SBC → Trunks → Batch Settings: Select multiple trunks at once to uniformly set media_mode, video_policy, CAC, and other parameters.
3. Health Check
SBC → Trunks → Health Status:
| Field | Description |
|---|---|
| Status | UP / DOWN / UNKNOWN |
| RTT | Latest OPTIONS latency (ms) |
| Last Check | Last probe time |
| Failures | Consecutive failure count |
The SBC page displays real-time health status for all trunks, marking DOWN trunks in red.
4. Console Operations
4.1 View Trunk List
SBC → Trunks: Displays all trunks and their SBC metadata summary.
4.2 Edit SBC Configuration
Click the trunk name → modify the JSON configuration → save. Supports direct JSON editing or form-based editing.
4.3 Reload
SBC → Trunks → Reload: Re-reads trunk definitions from configuration files (does not affect SBC metadata in the database).