PortaOne sip trunk to VAPI
# support
r
Hi All, Just wondering if anyone has the skills to help me get custom sip trunks working with VAPI. Outgoing works fine, but I've tried every setting available on the PortaOnesip trunk end. I have tried phoneNumber@sip.vapi.ai and +phoneNumber@sip.vapi.ai in the invite header. But always get SIP/2.0 401 Unauthorized Using I ive got to this. Vapi's Method: Vapi requires a specific digest authentication handshake for incoming calls. This involves your SIP provider sending an initial INVITE without credentials, Vapi responding with a 401 Unauthorized challenge (which includes a unique nonce), and then your provider needing to send a second INVITE with a computed Authorization header that uses your Vapi SIP username and password to solve that challenge.   Can anyone help?
c
Hey, could you share the org_id? You can find it [here](https://dashboard.vapi.ai/org/settings). This will help me get more details. Also, please provide a call id where you experienced this issue so we can review the logs and identify the cause.
r
thanks you for your reply the ORG ID is d1ed1f0e-f6cc-47c2-b194-0b713a35a7c4
its every single call when you call 61370548494
the error i get on the sip trunks is Failed Bearer capability not authorized
no call is registered on the VAPI end
this is the email of me explaining the problem to our SIP trunk software provider and his repose
c
Hey ritzy, Thanks for reaching out! We're currently swamped with a bunch of tickets and it's taking us longer than usual to get back to everyone. I know waiting isn't fun, but we want to make sure we give your issue the attention it deserves rather than rushing through it. We'll circle back with you soon to get this sorted out.
r
ok thanks
c
Hey, thanks for sharing your details. Our team will look into it and get back to you soon with an update.
r
hi team any updates?
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