For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
WebsiteStatusSupportDashboard
DocumentationAPI ReferenceMCPSDKsCLI (new)What's New?
DocumentationAPI ReferenceMCPSDKsCLI (new)What's New?
  • Get started
    • Introduction
    • Phone calls
    • Web calls
    • Vapi Guides
    • Composer
    • CLI quickstart
  • Assistants
    • Quickstart
    • Tools
    • Custom keywords
    • Custom voices
    • Custom transcriber
    • Custom TTS
  • Observability
    • Boards
  • Squads
    • Quickstart
    • Overview
    • Handoff tool
    • Passing data between assistants
  • Best practices
    • Prompting guide
    • Debugging voice agents
    • Enterprise environments (DEV/UAT/PROD)
    • IVR navigation
  • Phone numbers
    • Free Vapi number
    • Inbound SMS
      • SIP telephony
      • SIP trunking
      • Networking and firewall
      • Troubleshoot SIP trunk credential errors
    • Phone Number Hooks
  • Calls
    • Call end reasons
    • Troubleshoot call errors
  • Outbound Campaigns
    • Quickstart
    • Overview
  • Chat
    • Quickstart
    • Streaming
    • Non-streaming
    • OpenAI compatibility
    • Session management
    • Variable substitution
    • SMS chat
    • Web widget
    • Webhooks
  • Workflows
    • Quickstart
    • Overview
LogoLogo
WebsiteStatusSupportDashboard
On this page
  • Overview
Phone numbersSIP integration

SIP introduction

Make SIP calls to your Vapi assistant
Was this page helpful?
Edit this page
Previous

SIP Trunking

How to integrate your SIP provider with Vapi
Next
Built with

Overview

This guide shows you how to set up and test SIP calls to your Vapi assistant using any SIP client or softphone. You’ll create an assistant, assign it a SIP phone number, and make a call using a SIP URI. You can also pass template variables via SIP headers.

1

Create an assistant

Create an assistant with the POST /assistant endpoint. This is the same as creating an assistant for any other transport.

1{
2 "name": "My SIP Assistant",
3 "firstMessage": "Hello {{first_name}}, you've reached me over SIP."
4}
2

Create a SIP phone number

Create a SIP phone number with the POST /phone-number endpoint.

1{
2 "provider": "vapi",
3 "sipUri": "sip:your_unique_user_name@sip.vapi.ai",
4 "assistantId": "your_assistant_id"
5}

sipUri must be in the format sip:username@sip.vapi.ai. You can choose any username you like.

3

Start a SIP call

Use any SIP softphone (e.g., Zoiper, Linphone) to dial your SIP URI (e.g., sip:your_unique_user_name@sip.vapi.ai).

The assistant will answer your call. No authentication or SIP registration is required.

4

Send SIP headers to fill template variables

To fill template variables, send custom SIP headers with your call.

For example, to fill the first_name variable, send a SIP header:

x-first_name: John

Header names are case-insensitive (e.g., X-First_Name, x-first_name, and X-FIRST_NAME all work).

5

Use a custom assistant for each call

You can use a custom assistant for SIP calls just like for phone calls.

Set the assistantId to null and the serverUrl to your server, which will respond to the assistant-request event.

PATCH /phone-number/:id

1{
2 "assistantId": null,
3 "serverUrl": "https://your_server_url"
4}

Now, every time you make a call to this phone number, your server will receive an assistant-request event.