Overview
In VeloPBX, every inbound and outbound call is decided by two pieces of configuration: Inbound Rules and Outbound Rules. Together they answer three questions for every call:
- An external party dialed one of our DID numbers — where does that call go?
- One of our extensions just dialed an outside number — which trunk should carry it?
- The call arrived after office hours, on a holiday, or during night mode — what should happen instead?
This page explains the routing model. The next two pages walk through configuring each rule type in detail.
How Routing Works
Inbound Calls
External caller dials a DID number
↓
VeloPBX matches the call against Inbound Rules
(by Trunk + DID number, optionally Caller ID)
↓
The matching rule forwards the call to its destination
(Extension / IVR / Ring Group / Queue / Voicemail / External)
↓
Office Hours / Holidays evaluation (if configured)
↓
Call connects to the chosen destination
Outbound Calls
Extension dials an external number
↓
VeloPBX evaluates Outbound Rules
(by dialed prefix, dialed length, calling extension or group)
↓
The matching rule selects a trunk
(or a list of trunks for failover / random distribution)
↓
Optional digit transformation (strip, prepend) + Caller ID
↓
Call is sent out over the chosen SIP trunk
Routing Building Blocks
| Component | Role |
|---|---|
| SIP Trunk | The link to your upstream provider that delivers PSTN calls |
| DID Number | A public number assigned to a trunk that customers can dial |
| Inbound Rule | Maps a DID (and optionally a Caller ID) to an internal destination |
| Outbound Rule | Maps a dialing pattern to one or more trunks, with priority and digit transforms |
| Office Hours | A weekly schedule that lets routing change between working and non-working hours |
| Holiday List | Date ranges that override Office Hours (e.g. national holidays, company shutdowns) |
Office Hours and Holidays can be global (set at the tenant level and reused everywhere) or rule-specific (defined inside a single Inbound or Outbound Rule). A rule-specific schedule overrides the global one for that rule only.
Inbound Forwarding Destinations
An Inbound Rule can forward a call to any of the following:
| Destination Type | Description |
|---|---|
| Extension | A specific user’s extension |
| Ring Group | A group of extensions that ring together or in sequence |
| Call Queue | A queue that distributes calls to agents according to a policy |
| Virtual Receptionist (IVR) | An automated menu that routes the call based on DTMF input |
| Voicemail | Sends the call directly to an extension’s voicemail box |
| External Number | A PSTN number reached over a configured trunk |
| Hang Up | Terminates the call immediately (useful for blocked numbers) |
You can also configure a 1:1 mapping between a range of DIDs and a range of extensions — for example, DIDs 442012345600–442012345800 route to extensions 1100–1300. See the Inbound Rules page for details.
Outbound Routing Strategies
Outbound Rules support two strategies when more than one trunk is configured:
| Strategy | Behavior |
|---|---|
| Prioritized | Trunks are tried in the configured order. If a call fails on the first trunk, VeloPBX automatically tries the next one. |
| Randomly | A trunk is picked at random from the list. If the call fails, another trunk is selected at random. |
Combined with rule Priority, this lets you build patterns such as least-cost routing (cheapest trunk first, fall back to a more expensive one) or carrier failover (primary trunk preferred, alternate trunk on outage).
Office Hours Behavior
Office Hours apply differently to inbound and outbound rules:
- Inbound Rules — calls are forwarded to different destinations during office hours, outside office hours, and during holidays. Calls are never blocked.
- Outbound Rules — calls placed outside office hours or on a holiday are blocked by the rule, even if every other condition matches. This is the standard mechanism for preventing after-hours toll fraud and personal calls from shared phones.
Next Steps
→ Inbound Rules → Outbound Rules → Office Hours and Holidays
Last updated: 2026-05-01