Skip to content

Access Control Lists (ACL) & Trusted SIP Peers

11 min readUpdated: Nov 29, 2026
View as Markdown
Role Primary Use Case Key Capabilities
Perimeter Security Engineer SIP threat mitigation & firewall orchestration. Enforce iptables/nftables rate limiting, manage Pike anti-flood policies, and configure CIDR access control lists.
SOC Incident Responder Forensic investigation & ban enforcement. Inspect IP reputation, audit blocked SIP attacks, and manage persistent IP bans.
Compliance Officer Infrastructure regulatory security. Review edge firewall policies, verify geo-blocking rules, and audit perimeter posture.

  1. Overview & Permissions Architecture
  2. Business & Operational Significance
  3. Visual Interface & Layout
  4. Field Reference: Trusted IPs & Address Groups
  5. SBC Engine Permissions Module & Routing Logic
  6. Address Group Numbering & Telephony Roles
  7. Operational Hardening & Best Practices
  8. Verification & Diagnostics
  9. Model Context Protocol (MCP) AI Integration
  10. Glossary

In Ring2All SBC, the Access Control List (ACL) module delivers telecom-grade trust governance and IP authorization for SIP signaling. Directly backed by SBC Engine’s native permissions module, the ACL engine manages two fundamental database tables: sbc.trusted (IP-based authentication for PBX core nodes and carrier gateways) and sbc.address (group-based IP/subnet routing classifications).

┌─────────────────────────────────────────────────────────────┐
│ INCOMING SIP SIGNALING PACKET │
│ (Source IP, Protocol, Port) │
└──────────────────────────────┬──────────────────────────────┘
│
┌──────────────────────────────▼──────────────────────────────┐
│ KAMAILIO PERMISSIONS MODULE EVALUATION │
└──────────────────────────────┬──────────────────────────────┘
│
┌───────────────────────┴───────────────────────┐
▼ ▼
┌──────────────────────────────┐ ┌──────────────────────────────┐
│ check_source_address(grp) │ │ allow_trusted() CHECK │
│ (Table: sbc.address) │ │ (Table: sbc.trusted) │
├──────────────────────────────┤ ├──────────────────────────────┤
│ • Group 1: Trusted SBC Node │ │ • Core Telephony Cluster │
│ • Group 8: PBX Auth (Bypass) │ │ • Carrier Wholesale Gateways │
│ • Group 9: CPS Rate Limits │ │ • RTPEngine Media Relays │
└──────────────────────────────┘ └──────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ AUTHENTICATION BYPASS & ROUTING DISPATCH │
│ (Trusted traffic skips SIP 401/407 digest challenges; │
│ Untrusted traffic strictly requires digest challenge) │
└─────────────────────────────────────────────────────────────┘

By maintaining pre-compiled in-memory hash tables of trusted peers, SBC Engine evaluates incoming SIP packets in zero clock cycles, bypassing digest authentication challenges for authorized carrier trunks while strictly enforcing password authentication for remote endpoints.


  • Carrier IP-Based Authentication: Enables seamless SIP trunking with Tier-1 wholesale telecom operators that rely on static IP peering rather than SIP registration or Digest (MD5/SHA) credentials.
  • Core PBX Cluster Interconnect: Authorizes internal Ring2All Telephony cluster nodes and RTPEngine media proxies to dispatch calls through the SBC perimeter without authentication overhead.
  • Elimination of Auth Overhead on High CPS: Eliminates the latency, packet round-trips, and CPU load of sending SIP 407 Proxy Authentication Required messages on high-volume inbound wholesale DID trunks.
  • Zero-Downtime Cache Reloading: Changes committed in the web interface automatically trigger SBC Engine permissions.addressReload and permissions.trustedReload via RPC, updating routing permissions instantaneously without restarting SIP daemons.

The ACL console provides an organized dual-section view featuring Trusted IPs at the top and Address Groups at the bottom, complete with instant creation dialogues and deletion protection for core loopback addresses.

Displays authorized trusted peer IPs (e.g., Telephony nodes, Media Relay Engines) and group-based subnet address definitions.

Access Control List (ACL) View


4. Field Reference: Trusted IPs & Address Groups

Section titled “4. Field Reference: Trusted IPs & Address Groups”
Field Type Constraint Description
IP Address String (IPv4/IPv6) Required The static IP address or CIDR subnet of the trusted telecom partner, PBX node, or carrier gateway.
Protocol Dropdown any, udp, tcp, tls Transport protocol constraint. Selecting any authorizes signaling across all transport types.
Label String Optional Descriptive identification tag (e.g., Core PBX Telephony Node 01, RTPEngine Media Node 02).
Actions Action Icon Trash Can Removes the peer from the trusted table and triggers an automatic cache reload.

5.2 Address Groups (sbc.address) Parameters

Section titled “5.2 Address Groups (sbc.address) Parameters”
Field Type Constraint Description
Group Dropdown / Int Numeric Group ID The functional routing classification group (e.g., 1 — Trusted SBC, 8 — PBX Auth, 9 — CPS Limits).
IP Address String (IPv4/IPv6) Required IP address or network boundary associated with the group.
Mask Number (0–32) Default 32 Subnet bitmask (e.g., 32 for a single host, 24 for a /24 subnet block).
Port Number (0–65535) Default 0 Port constraint. A value of 0 matches all source ports.
Label / Tag String Optional Custom telemetry metadata or functional configuration string (e.g., name:VitalPBX Casa-ip,gwgroup:1).

5. SBC Engine Permissions Module & Routing Logic

Section titled “5. SBC Engine Permissions Module & Routing Logic”

When incoming SIP requests enter SBC Engine’s main request route, they are evaluated against the permissions cache:

# sbc-engine.cfg snippet
route[REQINIT] {
# 1. Evaluate Trusted Peers (IP Auth)
if (allow_trusted()) {
xlog("L_INFO", "ACL: Authorized trusted peer $si:$sp [$proto]\n");
setflag(FLAG_TRUSTED_PEER);
route(DISPATCH_INTERNAL);
exit;
}
# 2. Evaluate Address Groups
if (check_source_address("1")) {
xlog("L_INFO", "ACL: Source $si matched Group 1 (Trusted SBC)\n");
setflag(FLAG_SBC_INTERCONNECT);
}
}

6. Address Group Numbering & Telephony Roles

Section titled “6. Address Group Numbering & Telephony Roles”

Ring2All SBC adopts a standardized group numbering taxonomy across the sbc.address table:

Group ID Functional Purpose Operational Behavior
1 Trusted SBC Interconnect High-priority inter-SBC cluster signaling and management links.
8 PBX Auth Bypass (FLT_PBX) Certified Core PBX nodes authorized to originate calls without challenge.
9 CPS Rate Limit Rules Carrier endpoints with custom Calls-Per-Second rate exception thresholds (tag: cps:50).
10 Emergency Dispatch Public Safety Answering Point (PSAP) and E911 high-priority trunks.

  • Always Specify Subnet Masks Explicitly: Use /32 for individual server nodes rather than accepting broad defaults, preventing entire cloud hosting provider subnets from gaining trusted status.
  • Protect Loopback Addresses: Ring2All SBC automatically blocks deletion of 127.0.0.1, ::1, or localhost from permissions tables to prevent breaking internal RPC communication.
  • Avoid Tag Clashes in Group 9: When configuring CPS rate exceptions in Group 9, always format the tag as cps:<number> (e.g., cps:50) so the Pike rate limiting parser can extract the integer value accurately.
  • Verify Cache Reloads: Ensure that every insertion or modification is followed by a successful permissions.addressReload to prevent drift between PostgreSQL and SBC Engine memory.

Inspect all entries in both tables:

Terminal window
# Query Trusted Peers
sudo -u postgres psql -d ss_sbc -c "SELECT id, src_ip, proto, pattern, tag FROM trusted;"
# Query Address Groups
sudo -u postgres psql -d ss_sbc -c "SELECT id, grp, ip_addr, mask, port, tag FROM address ORDER BY grp;"

9.2 Trigger In-Memory Cache Reload via RPC

Section titled “9.2 Trigger In-Memory Cache Reload via RPC”

Manually refresh SBC Engine’s in-memory permissions tables:

Terminal window
sbc-cli permissions.addressReload
sbc-cli permissions.trustedReload

Inspect the live routing tables in SBC Engine memory:

Terminal window
sbc-cli permissions.addressDump
sbc-cli permissions.trustedDump

9. Model Context Protocol (MCP) AI Integration

Section titled “9. Model Context Protocol (MCP) AI Integration”

The Ring2All SBC MCP Server exposes dedicated carrier peering and whitelist management tools under the acl category. Autonomous telephony agents and the Ring2All SBC NOC AI Assistant can audit trusted partner lists, provision new carrier IP endpoints, and trigger immediate SBC Engine memory reloads.

Tool Name Operation Type Risk Level Description
list_trusted_ips Read-only read_only Lists all trusted IP subnets, PBX core nodes, and carrier whitelist entries with transport protocols and labels.
add_trusted_ip Mutating / Operational critical Adds a new trusted IP or subnet to the SBC Engine ACL permissions table, bypassing digest challenges and flood filtering.
remove_trusted_ip Mutating / Operational critical Removes a trusted IP address from SBC Engine permissions (protected against deleting loopback or management addresses).
reload_acl_permissions Operational / Sync operational Triggers SBC Engine RPC commands (permissions.addressReload, permissions.trustedReload) to synchronize memory with PostgreSQL.
  • Description: List all trusted IP subnets and carrier whitelist entries configured in SBC Engine ACL permissions.
  • Input Schema:
{
"type": "object",
"properties": {
"search": {
"type": "string",
"description": "Filter by IP address or tag/description"
}
}
}
  • Description: Add a new trusted IP address or subnet to SBC Engine ACL permissions.
  • Input Schema:
{
"type": "object",
"properties": {
"ipAddress": {
"type": "string",
"description": "IPv4 address or subnet (e.g., '198.51.100.50')"
},
"proto": {
"type": "string",
"enum": ["any", "udp", "tcp", "tls"],
"description": "Transport protocol (default: any)"
},
"tag": {
"type": "string",
"description": "Descriptive label (e.g., 'Telnyx Carrier Gateway 01')"
}
},
"required": ["ipAddress"]
}
  • Description: Remove a trusted IP address from SBC Engine ACL permissions.
  • Input Schema:
{
"type": "object",
"properties": {
"ipAddress": {
"type": "string",
"description": "IP address to remove from trusted permissions"
}
},
"required": ["ipAddress"]
}
  • Description: Reload SBC Engine ACL permissions and address tables from database into RAM memory.
  • Input Schema:
{
"type": "object",
"properties": {}
}

Example 1: Listing Trusted Carrier Gateways

Section titled “Example 1: Listing Trusted Carrier Gateways”

Request Payload:

{
"tool": "list_trusted_ips",
"parameters": {
"search": "Telnyx"
}
}

Response Payload:

{
"success": true,
"data": {
"total": 2,
"trustedIps": [
{
"id": 12,
"srcIp": "192.76.120.10",
"proto": "any",
"tag": "Telnyx Primary Interconnect"
},
{
"id": 13,
"srcIp": "192.76.120.11",
"proto": "any",
"tag": "Telnyx Secondary Interconnect"
}
]
}
}

Example 2: Authorizing a New PBX Media Relay Node

Section titled “Example 2: Authorizing a New PBX Media Relay Node”

Request Payload:

{
"tool": "add_trusted_ip",
"parameters": {
"ipAddress": "198.51.100.50",
"proto": "udp",
"tag": "Telephony Core Node 03"
}
}

Response Payload:

{
"success": true,
"data": {
"message": "Trusted IP 198.51.100.50 added successfully",
"ipAddress": "198.51.100.50",
"proto": "udp",
"tag": "Telephony Core Node 03",
"reloaded": true
}
}

10.4 Bilingual Natural Language AI Assistant Prompts

Section titled “10.4 Bilingual Natural Language AI Assistant Prompts”
  • “List all trusted carrier IP addresses configured in SBC Engine ACL.” → Agent calls list_trusted_ips().
  • “Add 198.51.100.50 as a trusted carrier gateway with tag ‘Telnyx Wholesale’.” → Agent calls add_trusted_ip({"ipAddress": "198.51.100.50", "proto": "udp", "tag": "Telnyx Wholesale"}).
  • “Reload SBC Engine permissions tables from the database to ensure all worker threads are synchronized.” → Agent calls reload_acl_permissions().
  • “Lista todas las direcciones IP de confianza configuradas en las ACL de SBC Engine.” → Agente invoca list_trusted_ips().
  • “Agrega la IP 198.51.100.50 como gateway de confianza con la etiqueta ‘Telnyx Wholesale’.” → Agente invoca add_trusted_ip({"ipAddress": "198.51.100.50", "proto": "udp", "tag": "Telnyx Wholesale"}).
  • “Recarga las tablas de permisos de SBC Engine desde la base de datos para sincronizar la memoria RAM.” → Agente invoca reload_acl_permissions().

10.5 Enterprise Security & Execution Safeguards

Section titled “10.5 Enterprise Security & Execution Safeguards”
  1. Loopback & Local Interface Protection: The remove_trusted_ip tool executes strict guard validation via assertCanRemoveTrustedIp(). Any attempt to remove 127.0.0.1, ::1, or the host’s primary internal IP is blocked unconditionally with an error.
  2. Automatic In-Memory Refresh: Successful insertions and deletions automatically issue RPC reload commands (permissions.addressReload) within 3000ms timeouts to prevent memory-database divergence.
  3. Audit Trail Accountability: All ACL modifications register the executing operator identity and a cryptographic change hash in the administrative audit journal.

  • allow_trusted(): Native SBC Engine function that checks whether the incoming SIP message source matches an authorized entry in the trusted table.
  • check_source_address(): SBC Engine function that verifies whether an IP/port/protocol tuple matches a specific numeric group in the address table.
  • FLT_PBX: Internal transaction flag set when an incoming request originates from an authorized Core PBX node.
  • Digest Authentication: Challenge-response mechanism (RFC 2617 / RFC 8760) used to authenticate SIP endpoints using MD5, SHA-256, or SHA-512 hashes.
  • Model Context Protocol (MCP): An open standard enabling autonomous AI assistants and NOC AI assistants to securely discover and invoke SBC operational tools.