How can I make outbound calls work if I connected ...
# support
s
I already connected my phone number to VAPI, but I also need to make outbound work according to document https://docs.vapi.ai/telnyx#configuring-outbound-calling-with-telnyx. I understand I have to create outbound profile but there is not enought explaination how to configure it really. Like how I "Add Vapi" to Connections and Applications? I would greatly appreciate someone's help with a more detailed walkthrough!
v
Hi there! đź‘‹ I understand you're trying to set up outbound calling with your Telnyx number and VAPI. While I couldn't find specific information about "Adding Vapi" to Connections and Applications in Telnyx (as this terminology isn't explicitly defined in the documentation), I can definitely help you with configuring outbound calls between Telnyx and VAPI! Here's a detailed walkthrough on setting up outbound calling: ## 1. Create an Outbound Voice Profile in Telnyx According to the [Vapi documentation](https://docs.vapi.ai/advanced/sip/telnyx), you'll need to: 1. Go to Voice > Outbound Voice Profiles 2. Create a profile 3. Name it 4. Allow your desired destination 5. Leave the configuration screen as is 6. Assign your desired SIP trunk 7. Complete the process Alternatively, you can go to SIP Trunk > Your SIP Trunk > Outbound and select your newly created outbound voice profile. ## 2. Set Up Outbound Authentication in Telnyx To configure the outbound authentication method: 1. Go to Voice > SIP Trunking > Authentication and Routing in Telnyx 2. Scroll down to "Outbound Calls Authentication" 3. Add the two fixed IPs from VAPI 4. Select "Tech Prefix" 5. Create a unique 4-digit Tech Prefix (e.g., 1234, but make sure it's unique to your account) ## 3. Create a SIP Trunk Credential in VAPI Use the following API call to create a SIP Trunk Credential:
Copy code
curl -X POST https://api.vapi.ai/credential \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-vapi-private-api-key" \
  -d '{
   "provider": "byo-sip-trunk",
   "name": "Telnyx Trunk",
   "gateways": [
    {
     "ip": "sip.telnyx.com"
    }
   ]
  }'
## 4. Associate Your Phone Number with the SIP Trunk Use this API call to associate your phone number with the SIP trunk: ``` curl -X POST https://api.vapi.ai/phone-number \ -H "Content-Type: application/json" \ -H "Authorization: Bearer your-vapi-private-api-key" \ -d '{ "provider": "byo-phone-number",
"name": "Telnyx SIP Number", "number": "your-sip-phone-number", "numberE164CheckEnabled": false, "credentialId": "your-new-trunk-credential-id-which-you-got-from-previous-step" }'
Copy code
## 5. Make Outbound Calls

Finally, to trigger outbound calls, use this API call:
curl --location 'https://api.vapi.ai/call/phone' \ --header 'Authorization: Bearer your-vapi-private-api-key' \ --header 'Content-Type: application/json' \ --data '{ "assistantId": "your-assistant-id", "customer": { "number": "tech-prefix-with-phone-number-without-plus-signal", "numberE164CheckEnabled": false }, "phoneNumberId": "your-phone-id" }' ``` **Important note about the phone number format**: If your phone number is +6699999999 and your Tech Prefix is 1234, the number should look like this: 12346699999999 (without the + sign). Is there anything specific about this process you'd like me to clarify further? Source: - [Vapi documentation](https://docs.vapi.ai/advanced/sip/telnyx)
s
But this is SIP Trunking, I thought connecting using API does not require SIP Trunking.
s
checking if this is resolved/solved for you?
e
I would like to know about it too, I think we don't have to SIP Trunk to connect VAPI and Telnyx for outbound calls
s
Hey Steve and Enyedi, could you guys brief me more on what help you actually require and what you've done until now to resolve it? So that I can understand - you're trying to do X, and you've done Y number of steps. I can suggest something else which is not covered under the Y number of steps.
e
My outbound function is working, but the sound quality on the phone call is horrible on the callee's end. Telnyx told me that the problem is on VAPI's end. They sent me call samples and my voice was crystal clear there. The thing is I couldn't find anything regarding codecses in the VAPI platform. The strange thing is the inbound calls are working properly but the outbound calls are very distorted. I am using the Voice Api connection to Telnyx. I already tried a lot of things, switched up different codecs inside Telnyx, G771U seems the best, and it works for inbound calls. But for outbound calls it doesn't work. Tried everything. Even tried to SIP Trunk Telnyx and VAPI, but this didn't work neither. Is there a way to disable or enable codecses on your end? I would like more help from you guys.
s
Marking this ticket conversation as duplicate for now with Enyedi.
s
is this ever resolved? The API integration is not working for me as well.
s
This ticket has been marked as solved, and as a result, you will no longer receive any further responses. Kindly create a new support ticket to escalate your inquiry.Â