failed to create sip trunk credentials
# support
f
when i try to add SIP credentials of zedarma to vapi its not adding and showing Error : failed to create SIP trunk credentials i don't know why this happens https://cdn.discordapp.com/attachments/1402449337367400532/1402449337853804714/Screenshot_2025-08-06_060224.png?ex=6893f43a&is=6892a2ba&hm=c6f638e78a87d102e87c7e31f1ac2b53b673bedad27705aa4cdc342e175a1928&
v
Try adding your Zadarma SIP credentials using the following API call, making sure all fields are correct:
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" }],
    "outboundLeadingPlusEnabled": true,
    "outboundAuthenticationPlan": {
      "authUsername": "YOUR_SIP_NUMBER",
      "authPassword": "YOUR_SIP_PASSWORD"
    }
  }'
Double-check your SIP number, password, and private key for typos or missing values, as incorrect credentials are a common cause of this error. [See full Zadarma SIP integration steps](https://docs.vapi.ai/advanced/sip/zadarma) Source: - [Zadarma SIP Integration](https://docs.vapi.ai/advanced/sip/zadarma)
f
@Vapi Support Bot how do i create with Api call instead of vapi Integration interface ( actually i am new to vapi )
v
To create your Zadarma SIP trunk credential using the API, use the following cURL command (replace the placeholders with your actual details):
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" }],
    "outboundLeadingPlusEnabled": true,
    "outboundAuthenticationPlan": {
      "authUsername": "YOUR_SIP_NUMBER",
      "authPassword": "YOUR_SIP_PASSWORD"
    }
  }'
Be sure to replace
YOUR_PRIVATE_KEY
,
YOUR_SIP_NUMBER
, and
YOUR_SIP_PASSWORD
with your actual credentials.
[Full Zadarma SIP integration guide](https://docs.vapi.ai/advanced/sip/zadarma) Source: - [Zadarma SIP Integration](https://docs.vapi.ai/advanced/sip/zadarma)
v
Message marked as helpful by @Faraaz! 🎉
c
Checking if this is resolved/solved for you?
p
I'm also having the same issue
@Vapi Support Bot I'm having the same issue with the BYO SIP Trunk
c
Hi, to configure the SIP Trunk, please follow the documentation for whitelisting the IP addresses: Then use this template as a guide to configuring both inbound and outbound gateways. The inbound gateway will need a static IP address and the outbound gateway will use the resolved domain name using UDP protocol:
Copy code
{
  "provider": "byo-sip-trunk",
  "name": "My SIP Trunk",
  "gateways": [
    {
      "ip": "sip.provider.com",
      "port": 5060,
      "outboundEnabled": true,
      "inboundEnabled": false,
      "outboundProtocol": "udp"
    },
    {
      "ip": "203.0.113.10",
      "port": 5060,
      "outboundEnabled": false,
      "inboundEnabled": true
    }
  ]
}
Once you have configured the SIP trunk, you will receive a value for credentialId. Save that and use it for the next step of assigning the SIP trunk to a phone number, as that is a required value for setting up the phone number. If you encounter any issues with the setup, please feel free to reach out.
3 Views