SIP Trunking Issue Outbound Calls
# support
s
I have the following issue. I imported a number via BYO SIP Trunking from Telnyx to VAPI. It works seamlessly for inbound calls. But outbound calls from the vapi dashboard fail. It always states: call queued successfully but never calls. When I investigate, it seems the issue is the following: I try to call a german number: +49... When I follow this: curl --location 'https://api.vapi.ai/call/phone' \ --header 'Authorization: Bearer YOUR_VAPI_PRIVATE_KEY' \ --header 'Content-Type: application/json' \ --data '{ "assistantId": "YOUR_ASSISTANT_ID", "customer": { "number": "CUSTOMER_PHONE_NUMBER", "numberE164CheckEnabled": false }, "phoneNumberId": "YOUR_PHONE_ID" }' and test it in curl from my CLI and use: CUSTOMER_PHONE_NUMBER = +49XXXXX -> it never calls. but when I put: CUSTOMER_PHONE_NUMBER = 0049XXXXX it works. So I think there is some issue in how the telynx sip trunking works? This also affects the transferCall function phone number ID: c32946de-2b04-419f-80bc-67008f55c8b0 assistant ID: 66febb4b-536f-4a30-b849-5dfd6f4816e6
v
According to the Telnyx integration documentation, when making outbound calls, the "+" sign should be omitted from phone numbers. This explains why
0049XXXXX
works while
+49XXXXX
fails. Try this modified curl command:
Copy code
bash
curl --location 'https://api.vapi.ai/call/phone' \
  --header 'Authorization: Bearer YOUR_VAPI_PRIVATE_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "assistantId": "66febb4b-536f-4a30-b849-5dfd6f4816e6",
    "customer": {
      "number": "0049XXXXX",
      "numberE164CheckEnabled": false
    },
    "phoneNumberId": "c32946de-2b04-419f-80bc-67008f55c8b0"
  }'
Source: - [VAPI Telnyx Documentation](https://docs.vapi.ai/advanced/sip/telnyx)
s
Yes it works like this from Curl but it doesnt work from the VAPI dashboard. If I am in vapi under phone numbers and in outbound settings I want to make a call -> here when I select Germany as country it automatically puts the +49 apparently and the call never is successful. Kindly look into this
When I try via the dashboard, vapi shows a success but in Telnyx I see we try calling a number that is: +49-49XXXXX so we duplicate the +49 and hence the call fails
c
Hey! To help track down this issue, could you share: - The call ID This would really help us figure out what went wrong!
s
this is one example: abf87ce8-acc1-46aa-8d01-125c217d14dd
c
We received 404 from Telny, for this call. Telnyx tried to route the German mobile number, got back “unallocated-number” from the PSTN, and relayed that as SIP 404. Double-check the number formatting and validity; if the number should exist, ask Telnyx to trace the call.
If you require I can share the further details.
s
The number exists and works. As I have stated earlier, if I use a curl command from my CLI it works when I put the number as 0049XXXX .... but it seems this is not what happens when I do this from the VAPI dashboard
The issue must be only about the formatting of the pre-dial and country code
So to sum up, if I try it via the VAPI dashboard it tries to call: +49XXX -> hence we get the 404 error. I get the same when I try to do this from curl with +49XXX as number. But when I test in curl with number: 0049XXX it works - this is the error
c
Can you try one call without the + symbol and with E14 check set to false?
Let me know how it goes for you.
s
also doesnt work - this is the call ID: a7375424-a1ed-48b2-9c16-076b13e21b26 - I get the same error
It only works with 0049: see this example: 8b88b1df-492d-47d4-8b5c-c1cf2f9fdb97
But when I do it from the vapi dashboard it never works
c
Let me do a review and get back to you.
The TransformPhoneNumber transformer would normally handle this, but in the dashboard-to-Telnyx flow, the problem occurs because: 1. The dashboard correctly formats the number with "+" prefix (E.164 format) 2. The number is passed directly to Telnyx without transformation 3. Telnyx expects the number without the "+" prefix for outbound calls (as shown by the successful curl test with "0049XXXXX")
s
Okay thanks for these insights. Is this then getting fixed? Or how can I get this to work for my use case?
c
Hey, Could you please schedule a brief call at your convenience so we can discuss this matter in detail? Kindly use the following link to book a suitable time: .
2 Views