> For the complete documentation index, see [llms.txt](https://dataqueue.gitbook.io/voicehub-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dataqueue.gitbook.io/voicehub-docs/integrations/sip-trunk/behind-a-call-manager.md). Agents can also search and read this documentation through its [MCP server](https://dataqueue.gitbook.io/voicehub-docs/~gitbook/mcp).

# Behind a Call Manager

Add VoiceHub as a SIP trunk on your existing call manager (Cisco CUCM, Avaya, …) so the IVR or a routing rule sends selected calls to the AI agent.

Many call centers already run a **call manager / PBX** (Cisco CUCM, Avaya, …) that owns the IVR, queues, and agent routing. VoiceHub plugs in as **just another SIP trunk** on that call manager: the IVR — or a routing rule — sends selected calls to the VoiceHub AI agent, and the agent can hand the call back to a human queue when needed. Nothing upstream changes — your carrier and voice gateway keep feeding the call manager exactly as they do today.

## Topology

```mermaid
flowchart LR
    pstn["Carrier / PSTN<br/>(e.g. STC)"]
    gw["Voice gateway / SBC<br/>(e.g. Fakeeh Gateway)"]

    subgraph CM["Customer call manager (Cisco CUCM / Avaya / …)"]
        ctrunk["PSTN trunk"]
        ivr["IVR"]
        aitrunk["AI SIP trunk"]
        q1["Queue 1"]
        q2["Queue 2"]
        esc["Escalation"]
    end

    agent["VoiceHub AI agent"]

    pstn --> gw --> ctrunk --> ivr
    ivr -->|"AI option /<br/>routing rule"| aitrunk
    ivr --> q1
    ivr --> q2
    q1 --> esc
    q2 --> esc
    aitrunk -->|"SIP trunk<br/>5060 + RTP 10000-20000"| agent
    agent -.->|"transfer to human"| q1
```

## How it fits

* **Upstream is unchanged.** Carrier (e.g. STC) → your voice gateway / SBC (e.g. Fakeeh Gateway) → call manager, exactly as today.
* **The call manager decides what reaches VoiceHub.** Route calls to the AI agent as a dedicated **IVR menu option** or via **routing rules** (the *AI SIP trunk* above).
* **Human fallback stays in the call manager.** The AI agent can **transfer back** to a queue (Q1 / Q2 → Escalation) for handoff to a live agent.
* **To VoiceHub, this is a standard SIP trunk.** The "provider" VoiceHub talks to is your **call manager**, not the carrier — so you wire it with one of the scenario guides below.

## Wiring the trunk

Pick the guide that matches how your call manager reaches VoiceHub:

| Your call manager…           | Use                                                                                                                                                                                                                                                        |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| On‑prem, over a private link | [Private (VPN) — IP / Username & Password](https://dataqueue.gitbook.io/voicehub-docs/integrations/sip-trunk/private-ip-auth.md) · [Private — SIP Registration](https://dataqueue.gitbook.io/voicehub-docs/integrations/sip-trunk/private-registration.md) |
| Over the public internet     | [Public — IP / Username & Password](https://dataqueue.gitbook.io/voicehub-docs/integrations/sip-trunk/public-ip-auth.md) · [Public — SIP Registration](https://dataqueue.gitbook.io/voicehub-docs/integrations/sip-trunk/public-registration.md)           |

On‑prem Cisco CUCM / Avaya deployments most often use a **private IPSec VPN with IP authentication**. Then [add the trunk](https://dataqueue.gitbook.io/voicehub-docs/integrations/sip-trunk/sip-trunk-setup.md) and configure [inbound](https://dataqueue.gitbook.io/voicehub-docs/integrations/sip-trunk/configuring-inbound-calls.md) and [outbound](https://dataqueue.gitbook.io/voicehub-docs/integrations/sip-trunk/configuring-outbound-calls.md) calls.
