How to setup byo with only SIP Uri, Username and P...
# support
u
Hello, we want to setup BYO Phonenumber for our siptrunk. What do we exactly need to set it up? Possible with only SIP Uri, Username and Password?
v
Hi there! 👋 Yes, you can set up a BYO phone number for your SIP trunk using SIP URI, Username, and Password, but you'll need a few additional configuration details as well. Here's how to do it: 1. Create SIP Trunk Credentials via API:
Copy code
bash
curl -X POST https://api.vapi.ai/credential \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "byo-sip-trunk",
"name": "BYOC Trunk",
"credentials": {
  "username": "YourUsername",
  "password": "YourPassword"
},
"gateways": [
  {
    "ip": "YourStaticIP",
    "port": YourStaticPort,
    "netmask": 32,
    "inboundEnabled": true,
    "outboundEnabled": true,
    "outboundProtocol": "udp"
  }
]
}'
2. Link Your Phone Number to the credential:
Copy code
bash
curl -X POST https://api.vapi.ai/phone-number \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "byo-phone-number",
"number": "your_phone_number",
"credentialId": "credential_id_from_step_1"
}'
For authentication, you'll need to configure the outbound authentication plan with your username and password. If your provider requires SIP registration, you'll also need to include SIP register details like realm, username, and domain. Let me know if you need any clarification on these steps! 😊 Sources: - [Discord Thread 1341469652366266408](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1341469652366266408) - [Discord Thread 1339952678150868992](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339952678150868992) - [Discord Thread 1334821142204121088](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334821142204121088)
u
Can you give an example for the configuration with filled in details? Where do I have to set the sip:url ?
n
Be advised - if your carrier requires to perform a
SIP REGISTER
before the
SIP INVITE
- most "low cost" carriers require this functionality, this will not work.
v
Hey, you can read this documentation
10 Views