Skip to main content
A trunk is your connection to a carrier. Inbound, the carrier sends calls for your numbers to Fonoster. Outbound, Fonoster sends your calls to the carrier. Use a trunk to bring numbers from any carrier that speaks SIP. For a Twilio number or a WhatsApp Business number, Link a Twilio number and Link a WhatsApp Business number do all of this for you. One trunk between your carrier and Fonoster. Inbound, the carrier sends calls for your numbers to sip:acme.pstn.fonoster.com, checked by an ACL or inbound credentials. Outbound, Fonoster sends your calls to sip.acme.com:5060 over UDP with outbound credentials, trying outbound URIs by priority, then weight. One trunk between your carrier and Fonoster. Inbound, the carrier sends calls for your numbers to sip:acme.pstn.fonoster.com, checked by an ACL or inbound credentials. Outbound, Fonoster sends your calls to sip.acme.com:5060 over UDP with outbound credentials, trying outbound URIs by priority, then weight.

Before you begin

Ask your carrier for:
  • How they authenticate you: by IP address, by username and password, or both.
  • Where to send outbound calls: a host name or IP, a port and a transport (UDP, TCP or TLS).
  • The addresses they send calls from, if you want to accept calls from those addresses only.
  • The format of your numbers in the calls they send, and the format they expect in the calls you send them.

Find your connection details

Your carrier needs to know where to send calls and which addresses to allow. The trunk form in the dashboard shows both, under Inbound URI:
Point your carrier at <host>:<port> (<transport>); allowlist <addresses>.
Give your carrier the SIP address, and ask them to allowlist the listed addresses if they filter by IP. If your workspace runs in a private region, the region’s own addresses are under Settings → Region, in Connection details.

Create the trunk

1

Add credentials (if your carrier uses them)

If your carrier gave you a username and password, save them as credentials first. Fonoster uses them to sign in when it sends calls to the carrier.
Go to Credentials, choose Add credentials, and enter a Name, the Username and the Password. Passwords are never shown again.
Usernames take lowercase letters, numbers, dots, underscores and hyphens.
2

Add an access control list (optional)

An access control list (ACL) is an allowlist of IP addresses. Attach one to the trunk so only your carrier’s addresses can send calls in. Anything not listed is rejected.
Go to ACLs, choose Add ACL, name it (for example Acme signaling IPs), and add each address or range, such as 200.88.12.0/24.
3

Create the trunk

Go to Trunks and choose Add trunk. The form has four parts.Inbound · carrier → Fonoster
  • Name: the carrier’s name, such as Acme.
  • Inbound URI: a short label that identifies this trunk, such as acme. The form adds your install’s .pstn.<domain>, so the URI reads acme.pstn.fonoster.com. Give it to your carrier: they send calls for your numbers to this host. It must be unique, so if it’s taken, pick another.
Outbound · Fonoster → carrierAdd a row for each address your carrier gave you, with its Host, Port and Transport. Fill in User only if your carrier asks for one. Fonoster tries enabled URIs by Priority, then spreads calls by Weight. A trunk without outbound URIs takes calls in but can’t send them out.Number format on outbound callsChange these only if your carrier asks. Called number (the number being dialed) and Caller number (your number, shown as caller ID) each take Leave as is, +E.164, E.164 without +, National or International. After the last three, a prefix field takes digits, * or # to add in front. See Number formats on outbound calls.Security
  • Access control list: the ACL from the previous step.
  • Inbound credentials: credentials your carrier must sign in with when it sends you calls. Use them if your carrier authenticates by password instead of IP.
  • Outbound credentials: the credentials from the first step.
  • Send REGISTER: turn on only if your carrier requires registration.
Choose Create trunk.
4

Add your numbers

Add each of your carrier’s numbers to the trunk in E.164 format. Fonoster also matches a number the carrier sends without the + or in the national or international form of its country; if the carrier sends something else, such as a label, add it to the number as an alias. Point each number at an agent, a stream or a SIP agent. See Numbers and routing.

Configure your carrier

In your carrier’s portal, set up:
  • Inbound (their origination): send calls for your numbers to sip:<your inbound URI>, such as sip:acme.pstn.fonoster.com, at the SIP address from the trunk form.
  • Authentication: allowlist the addresses the trunk form lists, or give them the inbound credentials you attached to the trunk.
  • Outbound (their termination): accept calls from the addresses the trunk form lists, signed in with the outbound credentials if you set them.
Use the transport your carrier prefers, and the same one on both sides.

Number formats on outbound calls

By default Fonoster sends numbers to your carrier as they were dialed. If your carrier asks for another format, set it on the trunk, separately for the called number (the number being dialed) and the caller number (your number, shown as caller ID): With E.164 without +, National and International you can also set a prefix, 1 to 20 digits, * or #, added in front (for example 9). Change these only if your carrier asks.
Go to Trunks, open the trunk, and under Number format on outbound calls choose the Called number and Caller number formats. After E.164 without +, National or International, enter a prefix if your carrier asks for one. Choose Save. Trunks made with Link Twilio or Link WhatsApp don’t show this section.

Check it

  1. Call one of the trunk’s numbers from any phone. The agent, stream or SIP agent it points at answers.
  2. Place an outbound call from the number. See Make outbound calls.
The trunk page lists the trunk’s numbers under Numbers on this trunk. If calls don’t arrive:
  • Check what the carrier sends for the number. Fonoster matches it in E.164, without the +, or in the national or international form of its country; for anything else, add an alias to the number.
  • Check that the number is on this trunk. A number on another trunk doesn’t ring.
  • If the trunk has an ACL, check that it lists every address the carrier sends from.
  • Check that the carrier sends to your inbound URI, not to a different host.

Delete a trunk

Go to Trunks, open the trunk and choose Delete, or run fonoster sipnet:trunks:delete <ref>. Calls to and from the carrier stop. For every command and method, see Trunks in the CLI reference and the Node SDK reference.

Next steps

Numbers and routing

Add the carrier’s numbers and send their calls somewhere.

Make outbound calls

Call out through the trunk.

SIP agents

Connect softphones and desk phones.

Transfer calls

Send callers to an operator through the same trunk.