How to generate PCAP file from a failed call?
# support
m
Please let me know how can I generate a PCAP file from a call.
v
To generate a PCAP file from a call, make a GET request to the Vapi API to retrieve the call details, then download the
pcapUrl
from the response. Here’s a sample cURL command:
Copy code
bash
curl -X GET "https://api.vapi.ai/call/{call_id}" \
  -H "Authorization: Bearer YOUR_API_KEY"
Look for the
pcapUrl
in the response, download the file, and open it in Wireshark for analysis. Replace
{call_id}
and
YOUR_API_KEY
with your actual call ID and API key. For more details, see the Vapi documentation on debugging call forwarding drops. Source: - [Debug call forwarding drops](https://docs.vapi.ai/phone-calling/transfer-calls/debug-forwarding-drops)
m
@Vapi Support Bot this command generates me JSON from a call and I need binary PCAP from a failed call for this call id 019a163b-d6f1-7335-b55c-281be5024737
v
Thank you for clarifying your issue. When you make the GET request to
https://api.vapi.ai/call/{call_id}
, do you see a
pcapUrl
field in the JSON response? This field should contain a direct link to download the binary PCAP file if PCAP is enabled and supported for your call. If the
pcapUrl
is missing, it could be due to your provider not supporting PCAP or the feature not being enabled for this call. Could you please confirm whether the
pcapUrl
appears in your API response? Sources: - [Debug call forwarding drops](https://docs.vapi.ai/phone-calling/transfer-calls/debug-forwarding-drops) - [Changelog: Call Packet Capture (PCAP) Configuration](https://docs.vapi.ai/changelog/2025/2/10) - [Get Call API Reference](https://docs.vapi.ai/api-reference/calls/get-call)
m
No, there is no such a link @Vapi Support Bot. Maybe it is because of the fact that the call didn't even started, it was "An error occurred in this call: call.in-progress.error-providerfault-outbound-sip-403-forbidden" and usually I can download PCAP straight from the call logs, but this time it was not available that is why I have highlighted "from failed calls"
v
Thank you for the details. Since the call failed with
call.in-progress.error-providerfault-outbound-sip-403-forbidden
and no
pcapUrl
is present in the API response, it may not be possible to generate a PCAP for calls that never established a connection, depending on provider support and Vapi's capabilities. To help us investigate further, could you confirm if PCAP files are available for other failed calls with similar error codes, or is this issue unique to this specific call? This will help determine if the problem is provider-specific or a broader limitation. If PCAPs are never available for such failures, escalation to Vapi support with your Call ID may be required for deeper log analysis ([see reporting guide](https://docs.vapi.ai/issue-reporting)). Sources: - [Debug call forwarding drops](https://docs.vapi.ai/phone-calling/transfer-calls/debug-forwarding-drops) - [Issue Reporting](https://docs.vapi.ai/issue-reporting)
c
Hi Marcello, To debug the issue of calls dropping immediately after a transfer is initiated, follow these steps: 1. Verify Vapi Initiated Forwarding: - Use the Vapi API to check if the call forwarding was initiated successfully:
Copy code
bash
     curl -X GET "https://api.vapi.ai/call/{call_id}" \
     -H "Authorization: Bearer YOUR_API_KEY" \
     -H "Content-Type: application/json"
- Check if
"endedReason": "assistant-forwarded-call"
is returned. If not, address any configuration errors such as removing
"phone-call-control"
from
serverMessages
and ensuring
phoneCallProviderBypassEnabled
is set to
false
. 2. Examine Telephony Provider Logs: - Log into your telephony provider's dashboard (like Twilio, Vonage, or Telnyx) and analyze call logs using
phoneCallProviderId
extracted from the call object to find any errors related to transfer. 3. Analyze SIP Packets (If Applicable): - If using SIP, download the packet capture from Vapi and open it in Wireshark:
Copy code
bash
     curl -X GET "https://api.vapi.ai/call/{call_id}" \
     -H "Authorization: Bearer YOUR_API_KEY"
- Use a Wireshark filter like
sip.Method == "REFER"
to identify if the transfer request was sent and any responses from your SIP provider. 4. Check Common Causes: - Ensure the destination number has the correct format, including the country code. - Test calling the destination number directly to confirm its availability and check for any call blocking that might be applied. For more detailed steps and potential solutions, you can refer to the [call forwarding drops guide](https://docs.vapi.ai/phone-calling/transfer-calls/debug-forwarding-drops).
3 Views