Zadarma is working only for outbound connection, n...
# support
i
Hi! Please. help. Setup everything according to instructions from Zadarma - https://zadarma.com/en/support/instructions/vapiai/ curl -X POST "https://api.vapi.ai/credential" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer XXX" \ -d '{ "provider": "byo-sip-trunk", "name": "Zadarma Trunk New", "gateways": [ { "ip": "pbx.zadarma.com", "inboundEnabled": false } ], "outboundLeadingPlusEnabled": true, "outboundAuthenticationPlan": { "authUsername": "XXX-XX", "authPassword": "XXXX" } }' curl -L 'https://api.vapi.ai/phone-number' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer XXX' \ -d '{ "provider": "byo-phone-number", "name": "Zadarma Number", "number": "35725123150", "numberE164CheckEnabled": false, "credentialId": "XXX" }' Outbound calls works correctly, but inbound - no. "Number not found".
v
It looks like inbound is not working because your SIP trunk credential has
"inboundEnabled": false
. To enable inbound calls, update your credential as follows:
Copy code
json
"gateways": [
  { "ip": "pbx.zadarma.com", "inboundEnabled": true }
]
Also, make sure Zadarma is forwarding calls to
35725123150@sip.vapi.ai
in their portal. This should resolve the "Number not found" issue for inbound calls ([source](https://docs.vapi.ai/advanced/sip/zadarma)). Source: - [Zadarma SIP Integration](https://docs.vapi.ai/advanced/sip/zadarma)
i
If I add inboundEnabled: true, I got {"message":"Couldn't validate SIP trunk credential. SIP gateway creation failed.","error":"Bad Request","statusCode":400}%
c
Hi Igor, To integrate Zadarma SIP with Vapi.ai, follow these steps: 1. Retrieve Your Vapi.ai Private Key - Log in to your Vapi.ai account and navigate to Organization Settings. Copy your Private Key from the API Keys section. 2. Add Your Zadarma SIP Credentials to Vapi.ai - Use the following curl command to send your SIP credentials to Vapi.ai’s API:
Copy code
bash
   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 placeholders with your actual details. 3. Add Your Virtual Number to Vapi.ai - Associate your virtual number with the SIP trunk in Vapi.ai using this command:
Copy code
bash
   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 placeholders with your actual details. 4. Assign Your Voice Assistant to Handle Calls - In your Vapi.ai dashboard, go to the Build section, select Phone Numbers, and assign your voice assistant to handle incoming and outgoing calls. 5. Configure Incoming Call Reception in Zadarma - Log in to your Zadarma account, go to Settings → Virtual phone numbers, and set up call forwarding to
YOUR_VIRTUAL_NUMBER@sip.vapi.ai
. For more details, you can refer to [Zadarma SIP Integration](https://docs.vapi.ai/advanced/sip/zadarma).
i
I did exactly that and wasn't able to get incoming calls
c
Please provide your phone number id and we will review the configuration
i
2bba3ee0-8c2c-4f3a-97f7-711f7c58dd32
c
Please also follow this step in the Zadarma integration page: