Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion agents/telephony/byo-sip.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

If your numbers already live at a carrier, you can connect them to your agents without porting anything. Point the carrier's SIP trunk at Fish Audio and import the number: it stays with your carrier, who keeps billing you for the telephone-network legs, and on Fish Audio the calls bill as ordinary agent sessions. Imported numbers carry no monthly rental and no telephony charges of any kind: no phone surcharge, no transfer fees; the call bills like a web session.

This works with any carrier or PBX that speaks SIP trunking: Twilio Elastic SIP Trunking, Asterisk or FreePBX, and most SIP providers. It is also the only way to use non-US/CA numbers, which the purchasable inventory does not cover.

Check warning on line 9 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L9

Did you really mean 'Twilio'?

## How it works

A SIP trunk has two directions, and carriers name them from the carrier's point of view. **Origination** is traffic your carrier originates towards Fish Audio: an inbound call. **Termination** is traffic your carrier terminates for Fish Audio: an outbound call the platform hands to your carrier or PBX to complete. Twilio's trunk configuration uses the same two words, and so do the fields below.

Check warning on line 13 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L13

Did you really mean 'Twilio's'?

- **Inbound (origination)**: your carrier routes calls for the number over its trunk to Fish Audio's SIP endpoint. The platform matches the dialed number and hands the call to the agent bound to it. From there it is a normal [inbound call](/agents/telephony/inbound-calls).
- **Outbound (termination)**, optional: give the import a termination host and the platform can also place calls from the number. Outbound calls and warm-transfer consult legs dial out through your trunk, with the imported number as the caller ID. You can also attach custom SIP headers that every call through the termination carries, for routing hints or tenant identification on your PBX.
Expand Down Expand Up @@ -84,30 +84,30 @@
The SIP endpoint is shared, so an import must prove that calls really come from your trunk:

- **Digest credentials**: the platform challenges your trunk and verifies the username and password. Use this whenever your carrier or PBX answers digest challenges (Asterisk, FreePBX, most SIP providers).
- **Allowed source addresses**: calls are only accepted from the listed IPs or CIDR ranges. Use this for carriers that do not authenticate their origination traffic; Twilio Elastic SIP Trunking is one, so for Twilio this is the required factor.

Check warning on line 87 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L87

Did you really mean 'IPs'?

Check warning on line 87 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L87

Did you really mean 'Twilio'?

Check warning on line 87 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L87

Did you really mean 'Twilio'?

Set both when your carrier supports it.

## Carrier walkthroughs

Check warning on line 91 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L91

Did you really mean 'walkthroughs'?

### Twilio Elastic SIP Trunking

Check warning on line 93 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L93

Did you really mean 'Twilio'?

<Steps>
<Step title="Create a trunk">
In the Twilio console, under **Elastic SIP Trunking**, create a trunk (or

Check warning on line 97 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L97

Did you really mean 'Twilio'?
reuse an existing one).
</Step>
<Step title="Point origination at Fish Audio">
Add an origination URI: `sip:1pv316az391.sip.livekit.cloud;transport=tcp`.
</Step>
<Step title="Attach your number">
On the trunk's **Numbers** tab, add the phone number. Twilio routes its

Check warning on line 104 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L104

Did you really mean 'Twilio'?
calls through the trunk from then on.
</Step>
<Step title="Import on Fish Audio">
Twilio's origination does not answer digest challenges, so authenticate by

Check warning on line 108 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L108

Did you really mean 'Twilio's'?
source address: allow Twilio's published signaling IP ranges for the regions

Check warning on line 109 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L109

Did you really mean 'Twilio's'?
you use (see [Twilio's IP address

Check warning on line 110 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L110

Did you really mean 'Twilio's'?
list](https://www.twilio.com/docs/sip-trunking/ip-addresses)). In the
console, the **Twilio Elastic SIP Trunking preset** button fills the ranges
and sets the transport for you.
Expand All @@ -117,19 +117,21 @@
(`yourprefix.pstn.twilio.com`) and attach a **Credential List**. Pass the
host as `termination_uri` and the credentials as `termination_auth_username`
and `termination_auth_password`. Credentials are required here: Fish Audio's
outbound traffic does not come from fixed IPs, so Twilio IP access control

Check warning on line 120 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L120

Did you really mean 'IPs'?

Check warning on line 120 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L120

Did you really mean 'Twilio'?
lists cannot authorize it.
</Step>
<Step title="Allow transfers (optional)">
For [cold transfers](/agents/telephony/transfers), enable **Call Transfer
(SIP REFER)** in the trunk's settings so Twilio honors the handoff.
(SIP REFER)** in the trunk's settings and also allow transfers to the PSTN.
If transfers are limited to SIP destinations, Twilio rejects every transfer

Check warning on line 126 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L126

Did you really mean 'Twilio'?
to a phone number, so transfers to phone numbers won't work.
</Step>
</Steps>

### Asterisk, FreePBX, and other SIP platforms

- Route the number's inbound calls to `sip:1pv316az391.sip.livekit.cloud;transport=tcp`.
- Configure digest credentials on the trunk and pass the same pair as `inbound_auth_username` and `inbound_auth_password`; add your PBX's public IPs to `inbound_allowed_addresses` for defense in depth.

Check warning on line 134 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L134

Did you really mean 'PBX's'?

Check warning on line 134 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L134

Did you really mean 'IPs'?
- For outbound, expose a termination host reachable from the internet and pass it as `termination_uri`, with digest credentials if your PBX requires registration or authentication.

## Outbound calls and transfers
Expand Down Expand Up @@ -224,7 +226,7 @@
}'
```

The body is the import payload without `phone_number`, `label`, and `agent_id`, and it replaces the whole configuration. Three things to know:

Check warning on line 229 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L229

Did you really mean 'phone_number'?

Check warning on line 229 in agents/telephony/byo-sip.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/byo-sip.mdx#L229

Did you really mean 'agent_id'?

- An empty password next to a set username keeps the stored password, so you can edit other fields without re-entering secrets. Setting a username for the first time requires a password.
- An empty `termination_uri` removes the termination and makes the number inbound-only again.
Expand Down
3 changes: 1 addition & 2 deletions agents/telephony/transfers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
## Prerequisites

- A phone number bound to your agent, answering inbound calls. See [Inbound calls](/agents/telephony/inbound-calls).
- The number must support transfers. Numbers purchased from the platform inventory (`provider: "twilio"`) do; see [Phone numbers](/agents/telephony/phone-numbers). [Imported SIP numbers](/agents/telephony/byo-sip) support cold transfers when the carrier honors SIP REFER, and warm transfers when a termination is configured.
- The number must support transfers. Numbers purchased from the platform inventory (`provider: "twilio"`) do; see [Phone numbers](/agents/telephony/phone-numbers). [Imported SIP numbers](/agents/telephony/byo-sip) support cold transfers when the carrier honors SIP REFER to the destination (on Twilio, enable Call Transfer and allow PSTN transfers on the trunk), and warm transfers when a termination is configured.

Check warning on line 20 in agents/telephony/transfers.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/transfers.mdx#L20

Did you really mean 'Twilio'?

## Configure destinations

Expand Down Expand Up @@ -185,8 +185,7 @@
## Limitations

- **Phone calls only**: web and SDK sessions have no phone leg to hand off, so the `transfer_call` tool never ships for them.
- **Transfer-capable numbers**: the number the caller dialed must be a `twilio`-provider number.
- **Supported countries**: destination numbers are limited to an allowlist of country codes.

Check warning on line 188 in agents/telephony/transfers.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/telephony/transfers.mdx#L188

Did you really mean 'allowlist'?

## Billing

Expand Down
Loading