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
        • Twilio
        • Telnyx
        • Zadarma
        • Plivo
        • Amazon Chime SDK
      • 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
  • 1. Retrieve Your Vapi.ai Private Key
  • 2. Add Your Zadarma SIP Credentials to Vapi.ai
  • 3. Add Your Virtual Number to Vapi.ai
  • 4. Assign Your Voice Assistant to Handle Calls
  • 5. Configure Incoming Call Reception in Zadarma
Phone numbersSIP integrationProviders

Zadarma SIP Integration

How to integrate SIP Zadarma to Vapi
Was this page helpful?
Edit this page
Previous

Plivo SIP Integration

Learn to connect your Plivo SIP trunk to Vapi for inbound and outbound calls
Next
Built with

Integrate your Zadarma SIP trunk with Vapi.ai to enable your AI voice assistants to handle calls efficiently. Follow the steps below to set up this integration:

1. Retrieve Your Vapi.ai Private Key

  • Log in to your Vapi.ai account.
  • Navigate to Organization Settings.
  • In the API Keys section, copy your Private Key.

2. Add Your Zadarma SIP Credentials to Vapi.ai

You’ll need to send a curl request to Vapi.ai’s API to add your SIP credentials:

  • Private Key: Your Vapi.ai private key.
  • Trunk Name: A name for your SIP trunk (e.g., “Zadarma Trunk”).
  • Server Address: The server address provided by Zadarma (e.g., “sip.zadarma.com”).
  • SIP Number: Your Zadarma SIP number.
  • SIP Password: The password for your Zadarma SIP number.

Here’s the curl command to execute:

$curl -L 'https://api.vapi.ai/credential' \\
>-H 'Content-Type: application/json' \\
>-H 'Authorization: Bearer YOUR_PRIVATE_KEY' \\
>-d '{
> "provider": "byo-sip-trunk",
> "name": "Zadarma Trunk",
> "gateways": [
> { "ip": "sip.zadarma.com", "inboundEnabled": false }
> ],
> "outboundLeadingPlusEnabled": true,
> "outboundAuthenticationPlan": {
> "authUsername": "YOUR_SIP_NUMBER",
> "authPassword": "YOUR_SIP_PASSWORD"
> }
>}'

Replace YOUR_PRIVATE_KEY, YOUR_SIP_NUMBER, and YOUR_SIP_PASSWORD with your actual credentials.

If successful, the response will include an id for the created credential, which you’ll use in the next step.

3. Add Your Virtual Number to Vapi.ai

Next, associate your virtual number with the SIP trunk in Vapi.ai:

  • Private Key: Your Vapi.ai private key.
  • Number Name: A name for your virtual number (e.g., “Zadarma Number”).
  • Virtual Number: Your Zadarma virtual number in international format (e.g., “15551111111”).
  • Credential ID: The id from the previous step.

Use the following curl command:

$curl -L 'https://api.vapi.ai/phone-number' \\
>-H 'Content-Type: application/json' \\
>-H 'Authorization: Bearer YOUR_PRIVATE_KEY' \\
>-d '{
> "provider": "byo-phone-number",
> "name": "Zadarma Number",
> "number": "YOUR_VIRTUAL_NUMBER",
> "numberE164CheckEnabled": false,
> "credentialId": "YOUR_CREDENTIAL_ID"
>}'

Replace YOUR_PRIVATE_KEY, YOUR_VIRTUAL_NUMBER, and YOUR_CREDENTIAL_ID with your actual details.

4. Assign Your Voice Assistant to Handle Calls

  • In your Vapi.ai dashboard, go to the Build section and select Phone Numbers.
  • Click on your Zadarma Number.
  • In the Inbound Settings section, assign your voice assistant to handle incoming calls.
  • In the Outbound Form section, assign your voice assistant to handle outgoing calls.

5. Configure Incoming Call Reception in Zadarma

To forward incoming calls from your Zadarma virtual number to Vapi.ai:

  • Log in to your Zadarma account.
  • Navigate to Settings → Virtual phone numbers.
  • Click the ⚙ (gear) icon next to your number.
  • Open the External server tab.
  • Enable External server (SIP URI).
  • Enter the address: YOUR_VIRTUAL_NUMBER@sip.vapi.ai (replace YOUR_VIRTUAL_NUMBER with your number in international format).
  • Click Save.

By following these steps, your Zadarma SIP trunk will be integrated with Vapi.ai, allowing your AI voice assistants to manage calls effectively.