In addition to the traditional routing that engages the usage of the rented phone numbers—DIDs—CarrierX allows its partners to use prefixes for routing.
This routing type might be very useful if the partner only uses traffic which never goes to the PSTN.
What is Prefix?
Prefixes are virtual routing entries that any partner may create.
A prefix is a sequence of digits. It can be a part of the phone number, or any other succession of digits, to which the endpoint will make the outbound calls.
When an outbound call is received by an endpoint, the destination for the call is checked for a match with all prefixes defined by its owner. If a match is present, the routing defined on the prefix object will be used.
The partners can specify as many prefixes as they need.
The following limitations are applied when the partners choose to use prefixes:
- Prefixes can be only applied to traffic from the endpoints, which are the source of this traffic. This is usually the case with the endpoints, which are used for the outbound calls.
- Prefixes may only route to trunks within trunk groups on the same partner. No traffic to other partners or to the PSTN is allowed.
How do Prefixes Work?
Each prefix is associated with a trunk group. For the proper routing, the trunk group must contain at least one trunk linked with the destination endpoint.
When the call is received by the “source” endpoint (e.g., from an external application), and it contains the match for the prefix, it is then routed to the trunk group associated with the prefix. The trunk group contains the trunk that is linked to the destination endpoint. This endpoint serves as an exit point for the traffic to another external application (External application #2 in the figure below):
Prefixes vs. DIDs
If routing is intended only within a partner internal traffic and no calls are aimed at going to the PSTN, prefixes are preferred since there is no reason to use up an actual phone number and it is more obvious that it is not going to be PSTN traffic.
For example, if a partner has a prefix for
516, any calls placed from this partner’s endpoints to the phone numbers that have this digit sequence in the beginning will respect this routing.
Moreover, this routing will be respected even if the partner with the prefix set up does not own any numbers that start with
516. In this case all the traffic to the numbers with this area code will also be routed to the trunk group associated with the specified prefix.
Prefixes can be used to create partners which use CarrierX for internal/CarrierX switching only and will never attempt to terminate calls to the PSTN.
Prefix Object API Reference
Refer to the Prefix object API reference to get the complete list of the prefixes attributes and methods used with the prefixes:
How It Works
Read the following articles to get a better understanding of how things work in CarrierX: