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

SettingDescriptionOptions
media_modeMedia proxy modeall, auto, nat, none, bypass
video_policyVideo policypassthrough, strip, transcode

media_mode details:

ModeBehavior
allAlways proxy media, all RTP passes through SBC
autoSmart detection (default), proxy when needed
natProxy only for NAT scenarios
noneDo not proxy media
bypassOnly 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:

FieldDescription
StatusUP / DOWN / UNKNOWN
RTTLatest OPTIONS latency (ms)
Last CheckLast probe time
FailuresConsecutive 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).