This picks up where Get started leaves off. You need an API key,
some credit and a SIP trunk; the first two take a minute in the
dashboard.
TypeScript
Dart
1
Connect your SIP trunk
Your carrier’s credentials. The password is stored encrypted and is never
returned by the API again, including to you.
2
Register a number on it
inbound_agent_id and inbound calls to this number are answered
automatically.No number yet? If the trunk was connected to Twilio, Telnyx, Plivo, Vobiz or
Vonage in one step, you can buy one on your own carrier account with
POST /v1/phone-numbers/purchase instead. Your carrier bills it at its price.
See Buying a number.3
Create an agent
Name the models you want. Call
GET /v1/engines for what is available and what
each costs. See Voice engines.opening_message is required. An agent without one answers in silence, and we
would rather ask than invent its first words.outbound_phone_number_id is the number from step 2, and it becomes the caller
ID of every call this agent places. Leave it out and each call in step 4 needs a
from_number_id instead, or it is refused with 400 no_outbound_number.4
Place a call
Idempotency-Key for you on calls, test calls and
top-ups, so the warning below is about the raw HTTP call.See what it cost
Every micro debited against a call is explained by a usage row, so you never have to reconcile a total by hand.Running out of credit
Credit is reserved before the call is placed, so an underfunded account is refused with402 before any resources are allocated.
Mid-call, the agent warns your caller about a minute out and speaks a closing
line before hanging up. It does not drop the line mid-sentence.
