> ## Documentation Index
> Fetch the complete documentation index at: https://www.voiceflow.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SIP connection settings

> Look up authentication, gateways, encryption and agent routing.

These settings apply to connections created under **Phone numbers → SIP**. Configure them in Creator; the public HTTP operation starts outbound calls and does not create or edit connections.

## Authentication, addresses and encryption

### Inbound authentication

| Mode | Required values | What must match |
| --- | --- | --- |
| IPs | Public source IPs or CIDR ranges. | The address sending the call must be in a configured range. |
| Credentials | SIP username and password. | The phone system must answer a SIP digest challenge. |
| Both | IP ranges plus username and password. | Both the source-address check and digest authentication must pass. |

The create form starts on **IPs**. A bare IPv4 address is saved as `/32`; use the public egress address when the PBX is behind NAT. Bring-your-own inbound gateways accept public IPv4 addresses/ranges, not hostnames or IPv6. An outbound-only bring-your-own trunk has no inbound authentication and does not accept inbound calls.

### Outbound destinations

| Setting | Voiceflow SIP | Bring your own SIP |
| --- | --- | --- |
| Address | One trunk hostname or public IPv4 address. | Ordered destination hostnames or public IPv4 addresses. |
| Protocol | UDP, TCP or TLS; UDP initially. | Per address: UDP, TCP or TLS; new rows use TLS while SRTP is on, UDP otherwise. |
| Port | Optional; `5060` for UDP/TCP, `5061` for TLS. | Same defaults for each address. |
| Username and password | Both required when outbound is enabled. | Both supplied or both omitted, according to the provider’s authentication. |
| Caller ID | Required E.164 number. | Required E.164 number, including when dialling a PBX extension. |

Ports must be integers from `1` to `65535`. Addresses do not accept schemes, paths, embedded ports, IPv6 literals, private IPv4 addresses or local/internal hostnames. Inbound and outbound credentials are independent.

### Encrypted audio

**Encrypted audio (SRTP)** starts off. Enabling it requires SRTP media and TLS signalling. The editor switches outbound addresses to TLS; inbound calls must use TLS on `5061`. A non-TLS INVITE on an encrypted connection is refused with `403 TLS Required`.

TLS signalling without SRTP leaves the audio-encryption setting unchanged. TLS outbound gateways require a certificate chain trusted by the system’s public CA store; self-signed certificates are rejected.

## Routing, failover and maintenance

### Agent and Environment routing

A connection runs one assigned agent. **All environments** selects a published Environment through the agent’s traffic split. A selected Environment and Draft or Published version pins that route. Unassigned connections do not run an agent. Every number routed to one SIP hostname uses the same assigned agent; there is no per-number agent selector within the trunk.

### Gateway failover

Bring-your-own outbound addresses are tried in their configured order. Transport/send errors, `5xx` responses and a timeout without ringing can advance to another gateway. Busy, declined or not-found responses are returned as call outcomes. A timeout after a `18x` ringing response does not trigger failover.

One digest-authentication retry is allowed per gateway after a `401` or `407` challenge. Recently unreachable gateways can be skipped for subsequent calls; this does not turn every unsuccessful call into a failover.

### Network and media

Send SIP signalling to the connection hostname copied from Creator: UDP/TCP on `5060` or TLS on `5061`. Do not replace it with a resolved IP address. `REGISTER` is rejected with `405 Method Not Allowed`.

The SIP proxy carries signalling, not audio. RTP/SRTP flows separately between the phone system and the media service, so a working SIP connection does not prove the media firewall rules are correct. Use the current [Telnyx media IP list](https://sip.telnyx.com/#media) for media allowlisting and the media ports negotiated in SDP. For a provider that restricts incoming signalling by IP, obtain the SIP egress allowlist for your Voiceflow workspace from your account manager; media addresses are not the signalling allowlist.

### Speech and keypad input

SIP calls use the agent’s [Voice input and Voice output configuration](/docs/documentation/build/behaviour). The managed telephony connection receives keypad digits and supplies them to the configured DTMF handling; your integration does not emit Socket.IO audio or keypad events for a SIP call.

### Caller identity and context

The SIP caller identity supplies the runtime user ID. A SIP address is reduced to its user part. Withheld or anonymous callers receive a generated `anonymous-` ID per call, rather than sharing one anonymous session.

Inbound custom headers are passed into the agent’s launch payload. The internal caller header is removed first; `callType`, `userNumber` and `agentNumber` use runtime values and cannot be overwritten by custom headers. Use [SIP transfer headers](/docs/api-reference/agent-runtime/voice/sip/transfers#pass-transfer-context) to pass context on a transfer.

### Editing and removing connections

Open a connection to edit it; changes save automatically. A blank existing-password field keeps its saved value. Enter a replacement to rotate it. Turning outbound off clears its saved destinations and credentials; on a bring-your-own trunk, turning inbound off also clears its inbound addresses and credentials.

Unassigning removes the agent route without deleting the SIP hostname. **Delete** removes the connection; a new connection receives a new hostname. Unassigned connections are eligible for automatic cleanup; unassigning does not reserve the SIP address indefinitely. A plan downgrade that reduces the SIP allowance removes excess connections, unassigned first and then oldest.

## Configuration example

### Separate a provider’s inbound and outbound addresses

Use different authentication settings for the two directions.

For an illustrative bring-your-own trunk, set **Inbound calls → IPs** to `198.51.100.0/24`. Set **Outbound calls and transfers → Address** to `sip.example.com`, choose TLS and leave Port blank to save `5061`. Enter an E.164 Caller ID and add outbound credentials only if that provider challenges calls.

The inbound source range authorizes calls into Voiceflow. The outbound hostname tells Voiceflow where to dial; it is not an inbound source-IP range. Replace both example addresses with the values your provider supplies. See [Bring your own SIP](/docs/api-reference/agent-runtime/voice/sip/bring-your-own).

## Limits and access

- Bring-your-own connections allow at most **10 address rows total**, across inbound and outbound settings.
- Both connection types count toward the workspace’s SIP allowance. The create form displays usage; there is no universal connection count for every workspace.
- Calls share the workspace’s production concurrency and credit checks. The [outbound endpoint](/docs/api-reference/agent-runtime/voice/sip/outbound) can return `429` for concurrency and `402` for credits.
- SIP creation remains subject to workspace availability. If the SIP options are disabled, contact your account manager.
