Constantine
10/01/2025, 2:19 PManswer to open the bidirectional WebSocket/RTP audio stream failed, and inbound caller audio never reached the assistant.
Please perform the following permanent fixes now:
1) Make the call.initiated webhook handler return HTTP 200 OK immediately for Telnyx events (do not block Telnyx with synchronous validation). Validate payloads asynchronously instead.
2) Ensure full support for Telnyx's answer` WebSocket audio handshake:
- Accept/handle WebSocket audio in bidirectional mode.
- Support Opus / 48000 Hz as primary codec and PCMU/8000 as fallback.
- Properly map payload types and do correct resampling if needed.
3) Add logging to capture the Telnyx webhook request+response (headers+body) and the answer failure stack trace.
4) Save the first 10–30 seconds of inbound audio that Vapi receives for each failed call for debugging.
5) Confirm format Telnyx will send (WebSocket with audio/opus frames or SIP/RTP). If Telnyx uses WebSocket, confirm Vapi’s WebSocket URL and accepted content-types.
We need confirmation once these changes are deployed. This is blocking a customer demo. Call Session ID and Telnyx connection ID are included below.
Call Session ID: 04992d02-9ec0-11f0-9583-02420aef32a0
Telnyx Connection ID: 2782442782319445746
Webhook URL: https://api.vapi.ai/telnyx/inbound_call
Please escalate to engineering and reply ASAP with ETA.
Thanks,
Constantine.Vapi Support Bot
10/01/2025, 2:20 PMjs
app.post('/telnyx/inbound_call', (req, res) => {
res.status(200).send(); // Respond immediately to Telnyx
// Process and validate payload asynchronously here
});
This pattern avoids blocking Telnyx and allows you to handle validation or logging in the background.
For more details, see the [webhook troubleshooting guide](https://docs.vapi.ai/cli/webhook#response-handling).
Source:
- [Webhook Troubleshooting Guide](https://docs.vapi.ai/cli/webhook#response-handling)Vercel
10/01/2025, 2:36 PMConstantine
10/01/2025, 2:42 PManswer step and save the first 10–30s of inbound audio for debugging.
4) Confirm here when deployed and whether you prefer us to force Opus on the Telnyx trunk or let Vapi handle negotiation.
If you need, I can ask Telnyx to confirm whether they are sending audio/opus frames over WebSocket or only PCMU for our trunk. Kindly confirm and give the ETA. This is currently blocking and delaying testing, as well as hindering the use of the AI.Vercel
10/01/2025, 2:49 PM