> ## 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.

# Deploy a voice agent with an Infobip static SIP trunk

> Connect number routing and IP-authenticated SIP.

## Overview

Route an existing Infobip voice number to a Voiceflow Voice agent using an **Infobip static SIP trunk** and **Bring your own SIP** in Voiceflow. Infobip carries the call; Voiceflow hosts the conversation and audio processing. The setup uses IP authentication, with separate addresses for calls into Voiceflow and calls back through Infobip.

**Note:** 

**Use a static trunk:** this walkthrough does not use a registered trunk, a provider preset or an authenticated trunk requiring `X-IB-AccessCode`. Those configurations have different authentication requirements. [Infobip SMS](/docs/guides/channels/sms/infobip) is a separate conversation channel.

<a id="prepare-infobip"></a>

## Before you begin

Obtain both systems' signalling sources before defining the static trunk.

| Owner | Required input |
| --- | --- |
| Agent builder | An editable [Voice agent](/docs/guides/studio/voice/first-phone-call), voice input/output, approved answers and a recognizable test Environment greeting. |
| Voiceflow administrator | Phone-management/project edit access, available SIP allowance and access to resolve the project runtime key for assignment. |
| Infobip administrator | An existing voice-enabled number, SIP trunking plan, permission to manage trunks/routes/number voice actions and the service address required for the selected location. Retain the number's current voice action and route. |
| Network administrators | Infobip's actual SBC signalling sources, its termination destination(s), transport/port, and the **Voiceflow signalling egress allowlist** supplied by your Voiceflow account manager. |
| Tester | A separate controlled phone and an unforwarded support destination if transfers are needed. |

The static trunk's **source** list controls calls sent from Voiceflow to Infobip. Its **destination** list controls where Infobip sends incoming calls. Voiceflow's inbound allowlist must contain the actual Infobip SBC sources, including the provisioned redundant side. Obtain these account/location-specific values through the administrators and confirm the trunk is operational before a call test. The shared [SIP network reference](/docs/api-reference/agent-runtime/voice/sip/settings#network-and-media) explains signalling versus media allowlists.

Infobip returns location-specific SBC information when a trunk is provisioned; account age and trunk type can affect whether this is a hostname or IP list. Use the returned values and provider-confirmed signalling ranges rather than borrowing another account's addresses. See [Infobip trunk setup](https://www.infobip.com/docs/voice-and-video/sip-trunking/set-up-sip-trunk).

<a id="connect-infobip"></a>

## Connect the static trunk

Create the SIP endpoint before assigning the number's incoming voice action.

### 1. Create the Voiceflow connection

In [Agent studio](https://creator.voiceflow.com), open the Voice project's **Phone numbers → Create number → SIP → Bring your own SIP**. Enter a name and enable **Inbound calls**. Choose **IPs** and add Infobip's confirmed public IPv4 signalling sources/CIDRs. Leave digest credentials unset for this IP-authenticated setup.

If callbacks are required, enable **Outbound calls and transfers** and add the provider-confirmed termination hostname(s) or public IPv4 addresses in failover order, using the transport/port Infobip supplies. Enter an authorized E.164 **Caller ID**, and leave outbound Username/Password empty. The static trunk authorizes Voiceflow using its source-IP list instead. Across both directions Voiceflow allows ten address rows; reduce to the relevant provider-confirmed sources/destinations if necessary.

Choose **Create**, copy the full **SIP address**, and confirm the Voice agent assignment. Open **Environment**, choose the controlled Environment and **Draft**, then **Save**. Workspace creation requires assigning the agent separately. See [Bring your own SIP](/docs/api-reference/agent-runtime/voice/sip/bring-your-own) for the shared form contract.

### 2. Create an Infobip static trunk

In the [Infobip portal](https://portal.infobip.com), open **Channels and Numbers → Channels → Voice and WebRTC → SIP Trunking → Create SIP trunk**. Choose an **Infobip static** trunk, the approved location, plan and capacity. Its destination FQDN is the complete Voiceflow SIP hostname. Its source IPs are the Voiceflow signalling egress addresses obtained above. For a basic unencrypted setup use UDP on `5060` on both sides.

Review the order before confirming its chargeable creation. Retain the returned SBC information, confirm the trunk's administrative/action status is ready, and reconcile the Voiceflow inbound allowlist with every actual provider signalling source. If your account does not expose the needed plan or address capacity, have Infobip enable/prepare it before proceeding. Follow the [static-trunk configuration](https://www.infobip.com/docs/voice-and-video/sip-trunking/set-up-sip-trunk#ip-configuration).

### 3. Prepare a named incoming route

Open **Voice and WebRTC → Call Routing**, create a dedicated test route and add the new trunk as a **SIP** destination. Use it as the primary destination; retain an approved fallback only if it is independently reachable. Leave the destination username override empty so the original dialled number remains the SIP user. Review and save the route before touching the number. See [Create routes](https://www.infobip.com/docs/voice-and-video/call-routing/create-routes).

### 4. Assign the controlled number's voice action

Open **Voice and WebRTC → Numbers**, select the number and its **Voice** tab, then set the incoming action to **Forward to Call Routing** and select the named test route. Save and reopen to check both the action and route. A number has one voice action at a time; this replaces its existing voice action. An explicit DID route avoids relying on dynamic filter selection. See [Select inbound routes](https://www.infobip.com/docs/voice-and-video/call-routing/select-inbound-routes).

The Voiceflow hostname selects the SIP connection; its saved assignment determines the agent/release for every routed number. Caller identity is taken from the call, separately from its dialled destination, and must not be treated as authenticated account identity. Voiceflow manages subsequent speech turns and call completion.

<a id="outbound-and-transfers"></a>

## Configure callbacks and transfers

Verify the reverse static route before enabling a backend trigger or handover.

### 1. Inspect both outbound authorization layers

Confirm the Voiceflow connection has **Outbound calls and transfers** enabled with Infobip's actual termination host/port/protocol and authorized Caller ID. Confirm Infobip's static source-IP list includes Voiceflow's supplied signalling egress ranges. These are different from the Infobip sources allowed into Voiceflow. Match any later TLS/SRTP change to the [shared encryption contract](/docs/api-reference/agent-runtime/voice/sip/settings#encrypted-audio).

### 2. Prepare the runtime request

Have the Voiceflow administrator supply `SIP_CONNECTION_ID` from this connection's **Outbound call API → View** and `VF_API_KEY`, a runtime key authorized for the assigned project's read/version-read permissions. Set `TEST_RECIPIENT` to a separate E.164 phone you can answer. From the backend, run this only when ready for a real callback:

```sh
jq -n --arg to "$TEST_RECIPIENT" '{to:$to}' |
curl --fail-with-body --silent --show-error \
  "https://runtime-api.voiceflow.com/v1/sip-connection/$SIP_CONNECTION_ID/outbound" \
  -H "Authorization: $VF_API_KEY" -H 'Content-Type: application/json' --data-binary @-
```

HTTP `200` has an empty body and no call ID. Confirm the phone rings, answer it and check the agent's speech. Inspect Infobip records before retrying a request with an uncertain result. [SIP outbound calls](/docs/api-reference/agent-runtime/voice/sip/outbound) owns the exact contract. Infobip's API key does not authorize this Voiceflow operation.

### 3. Prepare a separate support transfer

Configure **Agent → Call forward** or a Workflow **Call forward** step with a distinct support destination and its invocation condition. A phone transfer uses telephone handling; a SIP destination requests REFER. Before using a SIP transfer, have the Infobip administrator create a **Transfer Only** route with a **SIP** filter, this trunk ID and a **To** value matching the transfer destination. Add the intended **PHONE** destination, save, and review the filter using [SIP trunk routing](https://www.infobip.com/docs/voice-and-video/call-routing/execute-and-troubleshoot-routes#rerouting-with-sip-refer-route-execution). Confirm that it cannot select the original AI route again. Infobip retains the original SIP leg after connecting a REFER target, while Voiceflow stops the agent media after accepting a transfer. Verify that the complete call is cleared after both participants hang up before enabling this SIP handover for customers. A working callback does not establish REFER handling. Follow the [Voiceflow transfer procedure](/docs/guides/studio/voice/transfer-calls) and [transfer contract](/docs/api-reference/agent-runtime/voice/sip/transfers), then test actual teammate pickup.

<a id="test-calls"></a>

## Test the caller journey

Check every selected route through an audible conversation and completed call.

### 1. Call the Infobip test number

From a separate controlled phone, call the number. Expect the test Environment's greeting. Ask a known support question and confirm the complete spoken answer and audio both ways.

### 2. Continue and end the conversation

Ask a follow-up referring to that answer. Expect it to remain in context. Hang up, inspect the ended carrier legs in **Analyze → Logs**, and find the matching Voiceflow [Transcript](/docs/documentation/measure/transcripts) by time and caller. Make a fresh call to check repeat routing. The Infobip connected legs' `dialogId` helps correlate the carrier side.

### 3. Check callbacks and teammate pickup

If enabled, place one backend callback and confirm the actual Caller ID, intended agent, two-way speech and hangup. In a separate incoming call, request the configured support transfer; confirm the teammate receives and can speak to the caller, then end both legs. Inspect their records rather than equating a routing acceptance with pickup.

### No call reaches Voiceflow

Check the number action, selected route and actual Infobip SBC source.

Read back the number's single voice action and named route, then the route's SIP trunk and that trunk's destination hostname/status. Compare the actual SBC source with Voiceflow's inbound allowlist, including the redundant side. Check the Voiceflow agent and saved release separately. Creating a trunk alone does not assign the number's incoming route.

### Audio, outbound calls or transfers fail

Separate the media path, reverse source-IP approval and transfer route.

Use [SIP troubleshooting](/docs/api-reference/agent-runtime/voice/sip/troubleshooting) for negotiated media and codec checks. For callbacks, inspect Infobip's source-IP approval, termination destination and Caller ID policy. For SIP transfer, inspect the transfer-only route, its filters and destination. A rejected transfer may end the agent call. Review [Infobip call-routing results](https://www.infobip.com/docs/voice-and-video/call-routing) alongside Transcripts before attempting another call.

<a id="release-and-maintain"></a>

## Release and maintain the route

Coordinate agent publication, number actions and static trunk changes.

### 1. Release and test again

[Publish the reviewed Environment](/docs/documentation/deploy/environments/publishing), select **Published** on this connection and save. **All environments** follows Published traffic splits. Repeat the caller test on a fresh call before moving approved customer numbers to this route.

### 2. Maintain the deployment record

Retain the number's original/current voice action, route and trunk IDs, destination priorities, both signalling allowlists, Voiceflow SIP hostname/connection ID, agent and release. Check all associated numbers before editing a shared trunk. Confirm source/destination changes with both administrators and retest fresh calls after maintenance.

### 3. Restore or retire the route

To roll back, restore the recorded number voice action and route, then confirm the previous service answers. Route numbers away before deleting the Infobip trunk or unassigning/deleting the Voiceflow connection. Neither system restores the other system's routing automatically.
