PBX

PBX — Inbound Call Routing and DID Management

How Inbound Calls Work

When a call arrives from a carrier trunk, Asterisk executes the dialplan context on that trunk (default: from-trunk). The dialplan looks up the called DID number and routes it to the configured destination.

DID Assignment

  1. Go to Call Routing → DIDs.
  2. Add the DID in E.164 format (12125551234).
  3. Assign it to a tenant and set the destination: Extension, Ring Group, IVR, or Voicemail.

Destination Types

  • Extension — Rings a single extension; goes to voicemail on no-answer.
  • Ring Group — Rings multiple extensions simultaneously or in sequence (all, round-robin, linear strategies).
  • IVR / Auto-Attendant — Plays a greeting and routes based on DTMF key presses.
  • Voicemail — Sends caller directly to a mailbox.
  • External Number — Forwards the call out via a trunk to another PSTN number.

Time-Based Routing

DIDs support time conditions to route differently by day and time:

  • Business Hours — Route to IVR or ring group during open hours.
  • After Hours — Route to voicemail or an after-hours message.
  • Holidays — Override routing on specific dates.

Caller ID (PAI)

The PBX enforces P-Asserted-Identity (PAI) headers. On inbound calls, PAI takes priority over the FROM header for displayed caller ID.

Testing Inbound Routes

dialplan show from-trunk

Lists all active DID routing entries. Check Call Routing → CDR for call records after a test call.