Routing in NEXIA is a chain of four pieces. Each answers a different question, and every one of them is reusable: build it once, share it across customers.
Origination Point → Routing Group → Dial Peers → Termination Points
(the incoming customer) (the route bundle) (where it exits) (your carriers)
The four pieces
| Piece | What it is | Where it lives |
|---|---|---|
| Origination Point (OP) | A customer's way in: their IP or SIP user. It carries their selling tariff and one routing group. | Users → Origination Points → CONFIGURE → Routing section |
| Routing Group | The bundle of routes that customer sees. It holds dial peers ordered by priority. | Routing → Routing Groups |
| Dial Peer | The rule: these numbers go out through these carriers, in this order. | Routing → Dial Peers |
| Termination Point (TP) | The outbound carrier: its IP, its tech prefix and its cost tariff. | Users → Termination Points |
Everything is inherited, nothing is duplicated
- One routing group is assigned to N origination points. Ten customers on the same commercial plan share a single group: fix it once, all ten follow.
- One dial peer can sit in N routing groups, with a different priority and weight in each. The peer “Spain → CarrierX” can be priority 1 in the Premium group and priority 3 in the Budget group, with no copy involved.
- One termination point is used by as many dial peers as you like. If the carrier changes its IP, you edit it in one place.
Routing drives, the tariff connects
This is the rule that saves the most confusion. Each layer decides a different thing:
- The dial peer decides where the call exits: which carriers are tried, in what order. Nothing else.
- The tariff decides whether the call connects and at what price. The customer's selling tariff says what you charge; the carrier's cost tariff says what you pay.
That is why a routing rule can stay short and stable. If the peer allows all of Colombia
(^57[0-9]{10}$) but the selling tariff only carries prefix 573, mobiles
connect and landlines are rejected with NEXIA_NO_PROVIDER_RATE — with no change to
routing. You widen or trim your offer from the tariff, not from the regex.
How a call is evaluated
- The Origination Point is identified from the IP or SIP user that sent the INVITE. That gives you the customer's selling tariff and routing group.
- Its Routing Group is taken and the group's dial peers are walked by priority (lowest Prio first).
- Inside each dial peer: the dialled number must match the ALLOW rule and must not match the DENY rule. If either check fails, that peer does not apply and the next one is tried.
- Caller ID filter: if the peer restricts who may call, the source number must pass it.
- The carriers are picked in the peer's configured order — your order (priority and weight) or cheapest first (LCR) — and the first one is tried.
- If that carrier rejects or does not answer, the next candidate on the list is tried.
The highest-priority peer that applies wins. If none of its carriers work, the call falls through to the next dial peer in the group — unless that peer has stop hunting.
Failover: two levels
| Where | What it does |
|---|---|
| Stop Hunting (on the dial peer) | When it is on and every carrier of that peer fails, the call does not try other dial peers in the group: it ends there. It is the handbrake — use it when a destination must go out through those carriers and no others. |
| Failover parent group (on the routing group) | When every gateway of the group is exhausted, the call retries through the parent group, one hop only. Handy for keeping a generic backup group behind a specialised one. |
The parent is picked in Routing → Routing Groups → CONFIGURE → Edit → Failover parent
group. Any other group is a candidate. When the parent's gateways are exhausted too, the CDR
shows NEXIA_FAILOVER_EXHAUSTED with the detail of every attempt.
The group's dial peer table
In Routing → Routing Groups → CONFIGURE, the Assigned Dial Peers section is that customer's whole routing map on one screen. You add peers with + Assign Dial Peer (choosing Priority and Weight %) and take them out with Remove — removing a peer from the group does not delete it: it stays available to every other group.
| Column | What it means |
|---|---|
| Prio | Order within the group. Lower is tried first. |
| Active | Whether the dial peer is enabled. A disabled peer is ignored in every group it belongs to. |
| Name | The peer's name; the link opens its full form. |
| Destination regexp | Its ALLOW/DENY rules with their description and the actual pattern. With no rules it shows A-Z. |
| Stop Hunting | YES/NO — whether it stops hunting into the following peers. |
| TP Priority | How the peer picks among its carriers: weight (your order) or price (LCR). |
| TP List | How many termination points are assigned; the link opens them. |
| Weight | Load share among peers of the same priority. |
Longest prefix wins
Tariffs match by longest prefix. If a tariff holds 57 (Colombia) and
573 (Colombia mobile), the number 573001234567 is priced with
573. The specific always beats the general — for the selling price and for the
carrier's cost alike.
Rejection causes you will see
| Cause | Means |
|---|---|
NEXIA_NO_PROVIDER_RATE | No rate for that destination (selling or cost). Load the prefix into the right tariff. |
NEXIA_FAILOVER_EXHAUSTED | Every candidate was tried and none carried the call. Check your carriers. |
NEXIA_CHANNEL_LIMIT | Your licence channel cap was reached. |
The order to build routing in
- Load the tariffs (selling and cost) — no price, no call.
- Create the Termination Points with their cost tariff and tech prefix.
- Create the Dial Peers: which numbers each one handles and through which carriers.
- Build the Routing Groups by assigning peers with their Prio and Weight.
- Assign the group to each Origination Point.
- Test with the dial peer's Simulator and with Routing → Call Simulation.