Telnyx outbound call error: 422
# support
á
Hello guys! I have a configured Telnyx SIP trunk working well for outbound calls. I can initiate outbound calls to my hungarian phone number using Zoiper SIP client. I also integrated this SIP trunk into VAPI. A tried to initiate an out bound call using VAPi UI, but got this error: Couldn't Make Telnyx Call. Error: Request failed with status code 422. See the attached screenshot. I also tried to initate an outbound call using VAPI API. This is my request content: { "assistantId": "9a7be519-b4b0-4f5e-ac0f-9dc5814feb04", "customer": { "number": "124436202885573", "numberE164CheckEnabled": false }, "phoneNumberId": "1dd459c3-f3a0-47b0-8a1c-7585997f877d" } The response is the same: Couldn't Make Telnyx Call. Error: Request failed with status code 422 It seems to me this is an issue between VAPI and Telnyx. Could you please check this? I send the request to VAPI API at 27.03.2025 16:48 (UTC + 01:00) Thanks for helping! https://cdn.discordapp.com/attachments/1354844538283495594/1354844538585219184/image.png?ex=67e6c4cd&is=67e5734d&hm=8794cb089254881640498a97243f5cb766759f851c11e0d3026b99b89b0b69a8&
v
I see you're having trouble with the Telnyx outbound call through VAPI. Based on your request and the error message, I'd like to check a few things about your configuration: 1. I notice your API request includes
"number": "124436202885573"
- is this the correct format with your tech prefix? The [Telnyx configuration documentation](https://docs.vapi.ai/advanced/sip/telnyx) mentions that for outbound calls, the number should include your tech prefix without the plus sign. For example, if your phone number is +36202885573 and your tech prefix is 1244, it should look like "124436202885573". 2. Have you verified that your Telnyx outbound authentication is properly set up with the correct tech prefix? This would be configured under Voice / Sip Trunking / Authentication and routing in your Telnyx dashboard. 3. Have you created an outbound voice profile in Telnyx and assigned it to your SIP trunk? 4. Could you confirm that the
phoneNumberId
in your request corresponds to a phone number that's properly associated with your Telnyx SIP trunk credential in VAPI? 5. Have you tried making the call with
numberE164CheckEnabled
set to
true
instead of
false
? This would help me better understand your setup and provide more targeted assistance. Source: - [Telnyx SIP trunk configuration for VAPI](https://docs.vapi.ai/advanced/sip/telnyx)
Hi there! 👋 I see you're having trouble with outbound calls through your Telnyx SIP trunk when using VAPI. I'm unable to check the specific request you sent at the time mentioned, but I can definitely help troubleshoot the HTTP 422 error you're experiencing with Telnyx outbound calls. Based on the information you've provided, here are some potential causes and troubleshooting steps: ### Phone Number Format The most likely issue is with the phone number format. For Telnyx integration with VAPI: - Ensure your tech prefix is being used correctly. According to the [Telnyx integration documentation](https://docs.vapi.ai/advanced/sip/telnyx), the phone number with the tech prefix should look like "12346699999999" (no + sign). - In your API request, you're using "124436202885573" - check if "1244" is your tech prefix and if the rest is your Hungarian number. ### International Number Limitations - A Vapi number can only call US and Canada numbers by default. Since you're trying to call a Hungarian number, this could be causing the 422 error. ### Configuration Checks - Verify that your Telnyx SIP trunk is correctly configured in VAPI with the proper Credential ID, IP/Port, and Authentication details. - Check the "Authentication and Routing tab of your SIP Trunking Connection" in Telnyx. - Ensure that SIP Register is enabled with the proper Domain and Realm. ### API Request Parameters For your API request, verify: - The
numberE164CheckEnabled
is set to false, which is good for non-E164 numbers. - Your
assistantId
and
phoneNumberId
are correct. - You might need to include additional parameters like
name
for the call. ### Network Configuration - Check firewall and network configuration to ensure SIP traffic is allowed. - Verify that your network allows traffic on the SIP protocol and that any firewalls or NATs are configured to allow SIP messages to pass through.
Would you like me to provide more specific guidance on any of these areas, or do you have any additional information about the error that might help narrow down the issue? Sources: - [Telnyx integration documentation](https://docs.vapi.ai/advanced/sip/telnyx) - [Discord thread on HTTP 422 error](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1335869152535121960) - [Discord thread on SIP trunk configuration](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333747605628391434) - [Discord thread on international number limitations](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336713212233515089)
á
Yes, the phone numnber I initiate the call to is +36202885573. My telnys prefix is 1244, so I thinkm that I send the request correctly. SIP trunk for outbound calls in Telnyx works. I tested it with a SIP client, I can call my hungarian phone number Yes, I have voice profile set in Telnyx. I tried the numberE164CheckEnabled parameter set to true but the result is the same. In my Telnyx setup I also enabled the IP addresses of VAPI. It is still not working initate an outbound call using Telnyx number although all setup is correct. Can you check the 422 status code between VAPI and Telnyx?
k
Hey Ábel, you just have to delete your number and then import it again. After that, it will work as expected.
á
Thanks, I tried several ways to create credentials on API / SIP trunk on UI / add phone numbers using different credentials on API / add phone numbers on UI. Finally my problem is solved on Telnyx side. Although I had valid settings on Telnyx ( I can use the SIP trunk by SIP client) it was not enough for VAPI. I had to create a Voice API application and assign the numbers to it. VAPI started working from that point.
k
Ábel, sorry for your experience and hassle, but happy for you - it's working!
s
Szia! Én is a Telnyx-el vesződök, nem tudom API kulccsal native módon hozzáadni a Vapihoz. Kérlek tudnál segíteni?
k
Hi, checking if this is resolved/solved for you?
á
Hi, thanks it is resolved. I modified the tag.
k
Marking this ticket as Solved ✅
s
@Ábel Zoltán how exactly did you manage to solve this in telnyx? I am facing the same issue at the moment. Would be super grateful for any hint
á
I wrote it in a previous message: "Although I had valid settings on Telnyx ( I can use the SIP trunk by SIP client) it was not enough for VAPI. I had to create a Voice API application and assign the numbers to it. VAPI started working from that point." Anyway try to delete your VAPI phone number and reassign it to VAPI. But first try to make the Telnyx side changes.
s
thank you so much! I will try this