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

# SIP Integration Overview

> Learn how to integrate your phone numbers using SIP in SigmaMind.

# SIP Integration with SigmaMind

**SIP (Session Initiation Protocol)** is the backbone of modern voice communication. Using SIP, you can connect phone numbers purchased from external providers (such as Twilio, Vonage, or Telnyx) directly into the **SigmaMind** platform. This enables your AI agents to send and receive calls just like a real human agent.

***

## What is SIP?

SIP (**Session Initiation Protocol**) is a communication protocol used to set up and manage real-time sessions, such as voice and video calls, over the internet.

SIP does not transmit the audio itself. Instead, it handles the signaling — initiating, modifying, and terminating communication sessions. The actual voice data flows over a separate protocol called **RTP (Real-Time Transport Protocol).**

<Info>
  Think of SIP as the *signal* that establishes the call, while RTP is the *data channel* that carries the actual voice.
</Info>

***

## Key Terms in SIP

Before integrating, here are some common terms you may encounter:

* **SIP Trunking** – A virtual connection that replaces traditional phone lines, enabling multiple calls over the internet.
* **DID (Direct Inward Dialing)** – A virtual phone number assigned to your SIP trunk for inbound calls.
* **VoIP (Voice over IP)** – Technology for transmitting voice over the internet.
* **PBX (Private Branch Exchange)** – A private telephone network within an organization.
* **PSTN (Public Switched Telephone Network)** – The traditional landline network.
* **SIP URI** – An address (e.g., `sip:user@domain.com`) used to identify SIP endpoints.
* **SIP Registrar** – The server that registers your number or device with the SIP network.
* **SIP Proxy** – Routes SIP requests between devices and providers.

<Note>
  You do not need to memorize all these terms. A basic understanding is useful when configuring or troubleshooting SIP.
</Note>

***

## Why Use SIP with SigmaMind?

SIP integration allows you to bring your own numbers into **SigmaMind**, regardless of which provider you use. With this approach, you can:

* Keep your existing provider (`Twilio`, `Vonage`, `Telnyx`, etc.).
* Import your number into **SigmaMind** via SIP.
* Allow your AI agent to answer inbound calls and make outbound calls.
* Scale without relying on SIM cards or physical telecom hardware.

***

## How SIP Integration Works in SigmaMind

The high-level process looks like this:

1. Purchase a number from a SIP-supported provider.
2. Obtain SIP credentials (domain, username, password, proxy/server details).
3. Configure SIP settings in the SigmaMind Dashboard under [**Phone Numbers**](https://dashboard.sigmamind.ai/app/ai/phone-numbers).
4. SigmaMind connects to your SIP trunk, acting as a virtual softphone.
5. Calls to your number are routed into your AI agent in real time.

<Info>
  Your phone number remains with your provider. SigmaMind only manages the call flow and AI interaction.
</Info>

***

## Step-by-Step: Integrating SIP Numbers

### 1. Purchase a Number

Obtain a number from a SIP-supported provider such as:

* [Twilio SIP Trunking](https://www.twilio.com/sip-trunking)
* [Vonage SIP](https://www.vonage.com/communications-apis/sip/)
* [Telnyx SIP](https://telnyx.com/products/sip-trunking)

### 2. Collect SIP Credentials

From your provider, gather the following details:

* SIP Domain / Server
* SIP Username
* SIP Password
* SIP Proxy / Registrar (if required)

### 3. Configure in SigmaMind

In the SigmaMind Dashboard:

1. Navigate to [**Phone Numbers**](https://dashboard.sigmamind.ai/app/ai/phone-numbers).
2. Click **Add Phone Number**.
3. Enter the Phone number and SIP credentials provided by your provider.
4. Save the configuration and test the connection.

### 4. Assign Number to an Agent

* Go to [**Phone Numbers**](https://dashboard.sigmamind.ai/app/ai/phone-numbers).
* Select your imported SIP number.
* Assign it to an Inbound AI Agent and Outbound AI Agent.

At this point, your agent is ready to handle inbound and outbound calls using the configured number.

***

## Example: SIP Settings

Example configuration for **Twilio**:

```yaml theme={null}
SIP Domain: your-domain.pstn.twilio.com
Username: your-sip-username
Password: your-sip-password
Proxy/Registrar: sip.twilio.com
Transport: TLS
Port: 5061
```

<Note>
  The exact values will vary depending on your provider. Always confirm with their documentation.
</Note>

## Troubleshooting

* **401 Unauthorized** – Incorrect username or password.
* **404 Not Found** – Number not configured properly on the provider’s side.
* **One-way audio** – Likely an RTP or firewall issue. Ensure correct media ports are open.
* **Call drops after a few seconds** – Could be caused by NAT issues or SIP session timer settings.

<Tip>
  If problems persist, test your credentials with a softphone application such as **Zoiper** or **Linphone**. This helps verify provider setup before connecting with SigmaMind.
</Tip>

## Summary

* SIP is the protocol that connects external phone numbers to SigmaMind.
* Any SIP-supported provider (Twilio, Vonage, Telnyx, etc.) can be used.
* Configure SIP credentials in SigmaMind to integrate your number.
* Once set up, your AI agent can seamlessly handle both inbound and outbound calls.

<Info>
  SIP integration gives you flexibility, scalability, and freedom to choose your telecom provider, while letting SigmaMind power intelligent, AI-driven voice communication.
</Info>
