Skip to content

Twilio

Connect your own Twilio account, bring in its voice numbers, and give each number to an agent. Calls reach NuacemOne over an Elastic SIP Trunk in your Twilio account. Your numbers stay in your Twilio account and Twilio bills you for them and for the calls.

There are two ways to set up the trunk:

  • We set it up for you (recommended): NuacemOne creates the SIP trunk in your Twilio account and attaches the numbers you add. Needs a Standard API key.
  • I’ll set it up in Twilio myself: NuacemOne shows you the trunk address once, and you create the trunk and attach numbers in Twilio. A Restricted API key with read access to Phone Numbers is enough. See Manual SIP trunk.
  • A Twilio account with at least one voice-capable number.
  • Permission to create API keys in that account.
  • Telephony in your NuacemOne plan. If Settings → Channels → Phone shows a lock or a plan message, ask your NuacemOne contact.
  • You are an organisation admin in NuacemOne.
  1. Sign in to the Twilio Console.
  2. On the home page, copy your Account SID. It starts with AC, for example ACxxxxxxxx….
  3. Open Account → API keys & tokens and create an API key:
    • For We set it up for you, create a Standard key.
    • For I’ll set it up in Twilio myself, a Restricted key is enough. Give it read access to Phone Numbers (Incoming Phone Numbers).
  4. Copy the key’s SID (starts with SK) and its secret. Twilio shows the secret only once.
  1. Go to Settings → Channels → Phone and choose Connect Twilio.
  2. Choose how the SIP trunk is set up: We set it up for you or I’ll set it up in Twilio myself.
  3. Enter:
    • Name: a label for this account, for example “Twilio main”.
    • Account SID: starts with AC.
    • API key SID: starts with SK.
    • API key secret: stored encrypted; you won’t see it again.
  4. Choose Connect. NuacemOne checks the key with Twilio. Nothing changes on your numbers yet.
    • With manual setup, the button is Connect and show trunk address, and the next screen is Manual SIP trunk.
  5. Choose Add numbers on the new carrier. You see the voice numbers in your Twilio account and what each one does today.
  6. Choose Add next to each number your agents should answer.
    • If a number already answers calls somewhere else (a webhook, a TwiML app or another SIP trunk), the button says Move here. Moving points the number at NuacemOne, and whatever answers it today stops getting its calls.
    • With manual setup, adding a number does not change Twilio. Attach it to your trunk in Twilio as well.
  7. Give the number to an agent. See Numbers and routing.
  8. Publish the agent. The number answers once the agent is published.

Each Twilio carrier gets a secret route: a private address that only your Twilio trunk knows. NuacemOne accepts calls for your numbers only through that route. The carrier card shows Secret route on. If it shows No secret route, choose New secret route in the carrier’s menu.

Use this when your API key cannot create SIP trunks, or your team prefers to manage the trunk itself.

After you connect with I’ll set it up in Twilio myself, the console shows Set up your SIP trunk in Twilio with an Origination SIP URI.

  1. Copy the Origination SIP URI shown in the console.
  2. In the Twilio Console, open Elastic SIP Trunking → Trunks and create a new trunk, for example NuacemOne.
  3. Under General, set Secure Trunking as the console tells you: on if the URI ends in ;transport=tls, otherwise off.
  4. Leave Termination empty for now. It is only for outbound calls.
  5. Under Origination, add an Origination URI: paste the address, priority 10, weight 10, enabled.
  6. Under Numbers, add the numbers your agents should answer.
  7. Back in NuacemOne, use Add numbers to add the same numbers.
  8. Optional: paste the trunk’s Trunk SID (starts with TK, shown on the trunk’s General page) and choose Save. NuacemOne uses it only to show which of your numbers are attached to the trunk. You can set or clear it later from the carrier’s menu: Trunk SID.
  9. Choose I’ve saved it in Twilio.

If someone else may have seen the trunk settings, or you lost the URI:

  1. On the carrier, open the menu and choose New secret route.
  2. The console shows the new origination URI once. The old one stops working at once, so calls fail until you update Twilio.
  3. In Twilio, open Elastic SIP Trunking → Trunks → your trunk → Origination and replace the existing URI with the new one.

With We set it up for you, New secret route writes the new route into your Twilio trunk for you. Calls use it at once.

Agents call out through your Twilio trunk, with their own number from this carrier as caller ID.

  1. In the Twilio Console, open Elastic SIP Trunking → Trunks and select the trunk. With We set it up for you it is named NuacemOne followed by your carrier’s name.
  2. Open Termination. Set a Termination SIP URI, for example yourcompany.pstn.twilio.com, and save it.
  3. Under Authentication → Credential Lists, create a list with one username and a strong password (at least 12 characters), and select it. You don’t need an IP access list.
  4. Open Voice → Settings → Geo permissions and allow the countries your agents will call.
  5. In NuacemOne, on the carrier, choose Set up outbound.
  6. Enter the same Termination SIP URI (it must end in .pstn.twilio.com), Credential username and Credential password, then Save.

The carrier card shows Outbound calls: On, or Waiting for a number until the carrier has at least one number (each call shows one of them as caller ID).

To change the details later, choose Edit outbound. Leave the password empty to keep the stored one. To stop, choose Turn off outbound in the carrier’s menu. Calls already in progress are not cut off, and your Twilio trunk is not changed.

From the carrier’s menu:

  • Replace key: enter a new API key SID and secret. The new key is checked with Twilio before it replaces the old one. Revoke the old key in Twilio afterwards.
  • New secret route: see Replacing the origination URI.
  • Trunk SID (manual setup only): set or clear the trunk SID.
  • Turn off outbound: stop agents placing calls through this carrier.
  • Disconnect: removes the carrier’s numbers from NuacemOne. Remove the numbers from their agents first.
    • With We set it up for you, the SIP trunk NuacemOne created is deleted from your Twilio account.
    • With manual setup, delete the trunk in Twilio yourself, or point its numbers elsewhere.
    • Your numbers stay in your Twilio account either way.

To stop using one number, choose Remove next to it. Calls to that number no longer reach your agents, and the number stays in Twilio.

  1. Give the number to a voice agent and publish the agent.
  2. Call the number from a mobile phone. The agent should answer with its welcome message.
  3. Check the call in the console’s call history.

You can also test an agent’s draft by phone before publishing: in the agent’s test call panel, use Test by phone. You get a short-lived code and the numbers to dial.

  • The carrier card shows Secret route on and no Routing out of sync warning.
  • With manual setup, every number is attached to your trunk in Twilio and added in NuacemOne.
  • Each number shows the right agent under Used by, and that agent is published.
  • Old webhooks or TwiML apps on those numbers are no longer needed.
  • For outbound, Geo permissions allow only the countries you call.
  • You have revoked any old API keys.

Twilio charges for the numbers, the SIP trunk minutes and outbound calls. See Twilio Elastic SIP Trunking pricing and Twilio’s SIP trunking docs. NuacemOne usage (call minutes, calls at the same time, how many numbers and carrier accounts you can connect) follows your NuacemOne plan.

Symptom Fix
“Use a Twilio API key (SK…), not the account SID and Auth Token.” Create an API key under Account → API keys & tokens and use its SK… SID and secret.
“Enter a Twilio account SID (AC…).” / “Enter a Twilio API key SID (SK…).” Check you pasted the right value in each field, without spaces.
“Twilio rejected this API key for the account.” The key belongs to another account, was revoked, or the secret is wrong. Check the account SID, key SID and secret, or create a new key.
“Your key can’t create SIP trunks.” / “This API key can read your numbers but cannot create SIP trunks.” Use a Standard key, or choose Use manual setup instead and create the trunk yourself.
“This number already answers calls elsewhere in Twilio. Confirm to move it here.” Choose Move here and confirm. Whatever answered the number before stops getting its calls.
A number shows Used by another organisation The number is already on NuacemOne for another organisation. It must be removed there first.
A number shows No voice / “This number cannot receive voice calls.” Use a voice-capable number.
“Your organisation already has N of N phone number(s).” You have reached your plan’s number limit. Remove a number or ask your NuacemOne contact.
“An organisation can connect at most N carrier accounts.” Disconnect an unused carrier first.
“Telephony is not available to your organisation.” Telephony is not in your plan. Ask your NuacemOne contact.
“Connecting a carrier is not set up on this platform yet.” Ask your NuacemOne contact.
The carrier shows Routing out of sync Choose Retry on the warning. If it keeps failing, the message says why.
Callers hear “the number you have dialled is not in service” The number is not given to an agent, or the call did not come through your trunk’s secret route. Check Used by, and with manual setup check the Origination URI in Twilio matches the latest one.
Callers hear “this service is not available right now” The agent is not published, is paused, or has inbound calling off.
Callers hear “all our lines are busy” Your organisation is at its limit of calls at the same time, or the number’s daily call limit is reached.
“Enter the termination SIP URI from your Twilio trunk, e.g. yourname.pstn.twilio.com.” Copy the termination URI from the trunk’s Termination page. It ends in .pstn.twilio.com.
Outbound calls fail with “The carrier refused the call” Check Geo permissions allow the country, and the trunk’s Termination credential list matches what you entered.
Outbound calls fail with “The carrier could not be reached” Check the outbound settings on the carrier in Settings → Channels → Phone.
“X is used by an agent. Remove it from the agent first.” Unassign the number in Phone numbers or in the agent’s Call settings, then disconnect.