Trunks and Incoming Routing
By default a call to an account rings the device registered with the account’s credentials. A trunk is a SIP destination of the account itself, such as the customer’s PBX or gateway, with one or more addresses tried in order. Incoming Routing then decides, per DID of the account and for on-net calls, whether the call goes to the registered device or to one of the trunks.
Where to find it
Section titled “Where to find it”On the Accounts screen open Actions → Services → Trunks or Incoming Routing of the account. In edit mode the account form has the same two links in its header. The URLs are /trunks.php?i_account=<id> and /incoming_routes.php?i_account=<id>.
The account manages its own trunks in its portal under Routing → Trunks and changes the destination and the DID translation rule of the incoming routes you mark Self Managed under Routing → Incoming Routing.
Trunks
Section titled “Trunks”The list shows Status, Name, Description and Destinations (the first three addresses, +N for more). Status is a green check when every destination resolves, a red dot with the names of connections whose host name does not resolve, and a yellow dot for names not resolved yet. Name filters the list with is like / is not like.
Create a trunk
Section titled “Create a trunk”- Click Add New.
- Enter Name and an optional Description.
- Under Connections, enter Destination: the IP address or host name of the PBX, for example
pbx.example.com. - Enter Username and Password if the PBX asks the switch for SIP digest authentication.
- Click the arrow of the row for the advanced fields if you need them.
- Add more rows for backup addresses. A new empty row appears as soon as you type in the last one.
- Click Save & Close.
| Field | Meaning |
|---|---|
| Name | Name of the connection inside the trunk. Connection 1, Connection 2 … when empty |
| Destination | IP address or host name the calls are sent to. Rows without a destination are not saved |
| Username, Password | SIP digest credentials the PBX expects |
| Outbound CLD | Number sent to the PBX instead of the dialled one, for example the PBX extension |
| From Domain | Domain placed in the From header instead of the switch IP |
| Capacity | Simultaneous calls allowed to this destination. Empty means unlimited |
| Max CPS | Call attempts per second allowed to this destination. Empty means unlimited |
| Outbound IP | Which of your switch addresses sends the calls. [ Auto ] by default; pick one when the PBX accepts calls only from a known IP |
| Random Call-Id | Replace the Call-ID with a random value so the PBX does not see the caller’s addresses in it |
Connections are tried in the order of the rows: the second one takes the call when the first fails, and so on.
Edit or delete a trunk
Section titled “Edit or delete a trunk”Click the name or the pen icon. Remove on a row deletes that connection when you save. The trash icon in the list deletes the trunk with all its connections.
Incoming Routing
Section titled “Incoming Routing”The list has one row per source, created by the switch:
- On-Net Calls for calls from other accounts of the switch;
- one row per DID or DID range assigned to the account in the DID Pool, shown as
DID <number>orRange <first> - <last>.
| Column | Meaning |
|---|---|
| Source | The DID, the DID range or On-Net Calls |
| Destination | Registered Account (the default) or one of the account’s trunks |
| Fwd DID Mode | DID rows only: how the DID is passed on, see below |
| Self Managed | The account may change the destination in its portal |
Source and Destination filter the list. Rows cannot be added or deleted here: assign or release a DID in the DID Pool and its row follows.
Route a DID to a trunk
Section titled “Route a DID to a trunk”- Create the trunk first.
- Click Edit in the row of the DID.
- Select the trunk in Destination.
- Select Fwd DID Mode.
- Check Self Managed if the customer should be able to switch the DID between the trunk and the phone.
- Click Save.
Fwd DID Mode sets the called number (the Request-URI) of the forwarded INVITE:
| Mode | To the registered account | To a trunk |
|---|---|---|
| Off | The account name is the called number | The DID is the called number |
| Forward DID in URI | The DID is the called number | The DID is the called number |
| Diversion Header | The account name is the called number; the DID is added in a Diversion header |
The DID is the called number; the trunk’s Outbound CLD is added in a Diversion header |
Use Forward DID in URI when one PBX receives several DIDs and routes on the dialled number.
Route on-net calls to a trunk
Section titled “Route on-net calls to a trunk”Edit the On-Net Calls row and select the trunk. Calls from other accounts to this account then go to the PBX instead of the registered device. Fwd DID Mode does not apply to this row.
Upload and download
Section titled “Upload and download”Download exports the list with the columns Action [U], Id, Source, Destination (trunk ID, empty for the registered account), Forward DID Mode (1 Off, 2 Forward DID in URI, 3 Diversion Header) and Self Managed. Upload takes the file back: rows with U in the first column update the route with that Id; other actions are rejected and returned in an Incoming Routing errors file.