Twilio and numbers
Real calls run on your own Twilio account. Twilio bills you directly for minutes and numbers. You don't need any of this in test mode.
Only owners and admins can connect an account.
Connect your account
- In the dashboard, open Settings, then Telephony.
- Choose Connect your own account, then Connect Twilio.
- Enter your Account SID and Auth Token, both from Twilio's console. It has to be the Auth Token, not an API key.
- Press Connect.
Import your numbers
Press Import numbers, pick the ones you want and press Import. Buy any new numbers in Twilio's console first.
Importing points each number's voice and status webhooks at HCC, and we remember what they were. Removing a number or disconnecting the account puts them back. The number itself is never deleted from Twilio.
Choose what a number does
| A number can run | Set it with |
|---|---|
| A call flow | numbers on the flow and hcc deploy --live, or hcc.numbers.update |
| Your own call webhook | Numbers, Edit webhook. The signing secret is shown once |
| A fallback agent | Numbers, Fallback agent. It answers when your code can't |
To declare it in code:
export const inbound = defineCallFlow(
'inbound',
{ numbers: [env('SALES_NUMBER')] }, // live calls to this number run this flow
function* (c) {
yield* c.say('Thanks for calling.');
yield* c.hangup();
},
);Pointing a number at a flow needs the numbers:write Scope, which only a key an owner or admin makes can have. See Call flows for how deploys handle it.
Plans
Connecting Twilio and importing numbers need no plan. Placing live outbound calls does. See your plan on Settings, Billing.
What to read next
- Quickstart: point a number at a flow and call it.
- Outbound for reps: which number a rep's call shows as caller ID.