Operation

Routing: how NEXIA decides

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

PieceWhat it isWhere 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 GroupThe bundle of routes that customer sees. It holds dial peers ordered by priority.Routing → Routing Groups
Dial PeerThe 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.
Before deleting a dial peer, open its Used in Routing Groups section: it tells you exactly which groups — and therefore which customers — depend on it.

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.

Practical corollary: do not try to “block” destinations with ever-finer routing rules. Remove the prefix from the tariff (or flag it as blocked) instead.

How a call is evaluated

  1. 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.
  2. Its Routing Group is taken and the group's dial peers are walked by priority (lowest Prio first).
  3. 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.
  4. Caller ID filter: if the peer restricts who may call, the source number must pass it.
  5. 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.
  6. 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

WhereWhat 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.

ColumnWhat it means
PrioOrder within the group. Lower is tried first.
ActiveWhether the dial peer is enabled. A disabled peer is ignored in every group it belongs to.
NameThe peer's name; the link opens its full form.
Destination regexpIts ALLOW/DENY rules with their description and the actual pattern. With no rules it shows A-Z.
Stop HuntingYES/NO — whether it stops hunting into the following peers.
TP PriorityHow the peer picks among its carriers: weight (your order) or price (LCR).
TP ListHow many termination points are assigned; the link opens them.
WeightLoad 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

CauseMeans
NEXIA_NO_PROVIDER_RATENo rate for that destination (selling or cost). Load the prefix into the right tariff.
NEXIA_FAILOVER_EXHAUSTEDEvery candidate was tried and none carried the call. Check your carriers.
NEXIA_CHANNEL_LIMITYour licence channel cap was reached.

The order to build routing in

  1. Load the tariffs (selling and cost) — no price, no call.
  2. Create the Termination Points with their cost tariff and tech prefix.
  3. Create the Dial Peers: which numbers each one handles and through which carriers.
  4. Build the Routing Groups by assigning peers with their Prio and Weight.
  5. Assign the group to each Origination Point.
  6. Test with the dial peer's Simulator and with Routing → Call Simulation.
Not sure why a call went out where it did? The simulator replays the full decision for any number — rules, filters, the real carrier order and the margin — without routing anything. Form details in Dial Peers.
© 2026 NEXIA Networks · This wiki grows with every install: if something was missing, tell us and we add it.
On this page