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

# SIP Trunk vs WebSocket Visualizer

> Step through both Vobiz connectivity paths side by side - a SIP trunk using IP ACL or credentials, and a WebSocket app driven by your Answer URL.

Connectivity paths

# Two ways to put a call on Vobiz.

Same carrier network underneath, two different front doors. With a **SIP trunk** your PBX
talks to Vobiz over SIP and authenticates with an IP allowlist or SIP credentials. With
**WebSockets** your application talks to Vobiz over HTTPS and a `wss://` socket -
no PBX in the middle. On the SIP side your endpoint terminates the call and **then** hands
audio to the agent; on the socket side your server already **is** the agent. Step through
outbound and inbound on each - the media leg runs down the left gutter.

#### SIP Trunk

Use it when you already run telephony infrastructure, or your AI platform speaks SIP.

<ul><li>**You bring**A PBX, softswitch, or a SIP-native platform - LiveKit, VAPI, Retell, ElevenLabs.</li>
<li>**Auth**An IP Access Control List *or* a SIP username and password. Pick one; both are never required.</li>
<li>**Control**No XML and no Answer URL. Your SIP endpoint drives the call itself. Outbound goes to the SIP domain of the trunk; inbound is forwarded to your Primary URI.</li>
<li>**Agent**Sits *behind* the SIP endpoint. The endpoint terminates SIP and creates the room, then the agent joins - one extra hop that is yours to run.</li>
<li>**Media**RTP over UDP between Vobiz and your endpoint - no retransmission, so no jitter from recovery.</li></ul>

#### WebSocket

Use it when your agent is code and you want Vobiz to talk to it directly.

<ul><li>**You bring**An HTTPS server that returns VobizXML, plus a `wss://` endpoint.</li>
<li>**Auth**Your API credentials on the REST call. No SIP registration, no PBX.</li>
<li>**Control**You drive the call with *VobizXML*. Both directions start the same way: Vobiz fetches your Answer URL, you return XML, and Vobiz runs it. A `<Stream>` element hands the audio to your socket.</li>
<li>**Agent***Is* the server Vobiz connects to. There is nothing to terminate and no room to join, so the handoff hop disappears.</li>
<li>**Media**Audio and events share one bidirectional socket, so barge-in is yours to control.</li></ul>

**These are not mutually exclusive.** A SIP trunk can deliver a call into Vobiz, and that same
call can then be piped to your WebSocket server with a `<Stream>` element. SIP
handles the routing, the socket handles the audio.

[Read the full comparison](https://www.vobiz.ai/docs/concepts/sip-vs-websockets.md)
[Outbound trunks](https://www.vobiz.ai/docs/platform/sip/outbound-trunks.md)
[Inbound trunks](https://www.vobiz.ai/docs/platform/sip/inbound-trunks.md)
[Stream events visualizer](https://www.vobiz.ai/docs/resources/stream-events-visualizer.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.