PBX

PBX — Configuring SIP Trunks

What Is a Trunk?

A SIP trunk is the connection between the SipLive PBX and a carrier (Bandwidth, Intrado, ClearIP, etc.). Inbound PSTN calls arrive via trunks; outbound calls leave via trunks. Each trunk maps to realtime PJSIP objects in asterisk_rt.

Adding a Trunk

  1. Navigate to Communications → Trunks and select your PBX server.
  2. Click Add Trunk.
  3. Fill in the required fields and click Save Trunk.
  4. Click Apply to PJSIP — changes are written to MariaDB and applied immediately.

Key Configuration Fields

  • Name — Short identifier (lowercase, dashes OK). Used in dialplan and PJSIP endpoint IDs. Example: d1, bw-main.
  • SIP Server — Carrier's SIP proxy hostname or IP. Do not include sip:.
  • SIP Server Port — 5060 (UDP/TCP) or 5061 (TLS).
  • Transport — UDP for most carriers; TLS when the carrier mandates encryption.

Authentication Modes

  • None — IP-based auth. Carrier allows calls from your public IP without credentials. Most enterprise trunks use this.
  • Outbound — Digest auth on outbound calls. Requires auth username and secret.
  • Both — Digest auth in both directions.

Registration Modes

  • None — No registration. Used with IP-based auth.
  • Send — Asterisk registers to the carrier. Required for most hosted SIP trunks.
  • Receive — Carrier registers to Asterisk (rare).

Failback Gateway

When a route group has failback routing enabled, a trunk marked as Failback Gateway re-routes inbound calls arriving after primary trunks fail. Enables automatic PSTN failover scenarios.

Inbound Context

Controls which Asterisk dialplan context handles calls on this trunk. Default is from-trunk (standard DID routing). Only change for custom routing logic.

Verifying Trunk Status

After saving, use the Restart button to run pjsip qualify and view live trunk status. In the Asterisk CLI:

pjsip show endpoints
pjsip show registrations