Vapi home pagelight logodark logo
  • Home
  • Pricing
  • Status
  • Changelog
  • Support
  • Dashboard
  • Dashboard
Documentation
API Reference
  • Documentation
  • Quickstart
  • Dashboard
  • Community
  • GitHub
    • Introduction
    General
    • How Vapi Works
    • Pricing
    • Enterprise
    • Changelog
    • Support
    • Status
    Quickstart
    • Client SDKs
    • Examples
    • Code Resources
    Customization
    • Provider Keys
    • Custom LLM
    • Custom Voices
    • Custom Keywords
    • Knowledge Base
    • Multilingual
    • JWT Authentication
    • Speech Configuration
    Core Concepts
    • Assistants
    • Blocks
    • Server URL
    • Phone Calling
    • Squads
    Advanced Concepts
    • Calls
      • Call Forwarding
      • Ended Reason
      • SIP
      • Live Call Control
    • Make & GHL Integration
    • Tools Calling
    • Prompting Guide
    Glossary
    • Definitions
    • FAQ
    Community
    • Videos
    • My Vapi
    • Expert Directory
    Providers
    • Voice
    • Models
    • Transcription
    • Voiceflow
    Security & Privacy
    • HIPAA Compliance
    • SOC-2 Compliance
    • Privacy Policy
    • Terms of Service
    Calls

    SIP

    You can make SIP calls to Vapi Assistants.

    ​
    1. Create an Assistant

    We’ll create an assistant with POST /assistant endpoint. This is no different than creating an assistant for other transports.

    {
    	"name": "My SIP Assistant",
    	"firstMessage": "Hello {{first_name}}, you've reached me over SIP. How can I help you today?"
    }

    ​
    2. Create A SIP Phone Number

    We’ll create a SIP phone number with POST /phone-number endpoint.

    {
    	"provider": "vapi",
    	"sipUri": "sip:your_unique_user_name@sip.vapi.ai",
    	"assistantId": "your_assistant_id"
    }

    sipUri is the SIP URI of the phone number. It must be in the format sip:username@sip.vapi.ai. You are free to choose any username you like.

    ​
    3. Start a SIP call.

    You can use any SIP softphone to test the Assistant. Examples include Zoiper or Linphone.

    You just need to dial sip:your_unique_user_name@sip.vapi.ai and the Assistant will answer your call.

    There is no authentication or SIP registration required.

    ​
    4. Send SIP Headers to Fill Template Variables.

    To fill your template variables, you can send custom SIP headers.

    For example, to fill the first_name variable, you can send a SIP header x-first_name: John.

    The header name is case insensitive. So, X-First_Name, x-first_name, and X-FIRST_NAME are all the same.

    ​
    5. Use a Custom Assistant For Each Call.

    You can use a custom assistant for SIP calls same as phone calls.

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

    PATCH /phone-number/:id

    {
    	"assistantId": null,
    	"serverUrl": "https://your_server_url"
    }

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

    Was this page helpful?

    Suggest editsRaise issue
    Ended ReasonLive Call Control
    githubtwitterdiscordwebsitelinkedin
    Powered by Mintlify
    Assistant
    Responses are generated using AI and may contain mistakes.