Set up SIP Trunking on Build
What you need
Build handles the scaffolding for you, so your account is already set up with a 10DLC phone number.
The only thing left is connecting your own SIP endpoint to Build. That takes two things: a realm and a set of SIP credentials.
Haven't started a trial yet? Start your free trial to get your account provisioned first.
Outbound SIP 101
Realm: the domain your SIP trunk connects to. It's your unique address on the Bandwidth network, and it doubles as an FQDN with its own DNS record.
SIP credentials: a username and password. Build uses these to authenticate every call your trunk sends, so only you can place calls on your trunk.
To set up outbound SIP, you'll create a realm first, then add SIP credentials and link them to your Bandwidth phone number.
Inbound SIP 101
Routes: groups of one or more endpoints that we send inbound traffic to. Routes are prioritized, so your primary route will always be tried first.
- A secondary or tertiary route acts as a failover should a call fail at the first endpoint.
Endpoints: destinations that an inbound call can be sent to, such as a phone number or IP address. Endpoints are assigned weights, which determine the traffic split among the endpoints in a route.
- For example, if you define three endpoints at 33% each, we will evenly distribute incoming calls among all three endpoints.
Set up Outbound and Inbound SIP Trunking in the Bandwidth App
- Log in to the Bandwidth App and navigate to My Numbers.
- Select the Bandwidth phone number you’d like to use. Then, toggle on SIP Trunking under Voice configuration.
- Note that you will not be able to send Voice API traffic to or from this number if you choose to use it for SIP Trunking.
- Every phone number needs at least one route for inbound calls. Create as many endpoints for this route as you’d like, and indicate what percentage of traffic should use each endpoint.
- Build users can route inbound calls to a domain, IP, or SIP URI, or forward the call to a phone number.
- Create a realm to point your SIP client to whenever you place outbound calls.
- Realms can also be managed and created on the SIP Trunking level, and multiple phone numbers can be assigned to the same realm.
- Choose a username and password to use as your SIP credentials, and assign them to the realm you just created.
- Save your changes. You’re ready to speak SIP!
Set up Outbound SIP Trunking using the CLI
Our CLI is agent-native and comes with a pre-built workflow for configuring SIP and sending your very first test call. You can take the steps below on your own or tell the coding agent of your choice to use the CLI to do it for you.
- First, download the Bandwidth CLI.
- If you don't have an account already, use
band account registerand pass in your phone number, email, first and last name, and acknowledgement of our terms and conditions.- For example,
band account register --phone +19195551234 --email user@example.com --first-name John --last-name Doewill create a free trial account for John Doe. - Make sure you visit our documentation for Bandwidth Build to learn more about the available functionality for a trial account.
- For example,
- Get your from number using
band number list. - Create your realm using
band sip realm create --name siptest --default=false --wait.- From the output, copy the ID and the Hostname; you'll use both later.
- Wait a minute or two for the realm to become active. You can
band sip realm get siptestto make sure it's active before moving on. - Create your SIP credentials on that realm using
band sip credential create --realm siptest --username siptest-user --generate-password.- The password prints once and can't be recovered, so save it. If you lose it, use
band sip credential rotate. - Want to supply your own password instead? Pipe it in:
printf '%s' "$SIP_PASSWORD" | band sip credential create --realm siptest --username siptest-user --password-stdin.
- The password prints once and can't be recovered, so save it. If you lose it, use
- Point your SIP client at the realm hostname from step 4 and authenticate with those credentials. You're ready to speak SIP!
What's on you
Once your realm and credentials exist, you just need something that can send SIP invites:
- Test it fast: point a free softphone (Zoiper, MicroSIP) at your realm using your username and password, then dial a number.
- Build it in: if you're integrating your own app or PBX, configure it the same way: realm as the SIP server, credentials for auth, calls placed in E.164 format.
Either way, your client handles the call setup. Build takes it from there.
Check out our AI integrations if you’re ready to use SIP trunking to build your own conversational AI.