Gerónimo
08/19/2025, 11:40 PMPCMA, PCMU, and G729 to mitigate a high percentage of connection failures (503, 403 errors).
Problem:
We're trying to update our BYO SIP Trunk credential to set these codec preferences. Based on documentation, we attempted to use the codecPreferences field. However, the API rejects the request.
API Request Sent:
- Method: PATCH
- Endpoint: https://api.vapi.ai/credential/da9a3dfc-d738-4c21-ab20-ec18725aeba0
- Body:
json
{
"codecPreferences": [
"PCMA",
"PCMU",
"G729"
]
}
API Response Received:
- Status Code: 400 Bad Request
- Body:
json
{"message":["property codecPreferences should not exist"],"error":"Bad Request","statusCode":400}
Question:
Could you please provide the correct and currently supported method for setting a prioritized list of audio codecs on a byo-sip-trunk credential via the API?
This is a major blocker for our production scaling, and any precise technical help would be greatly appreciated.
Thank you!Shubham Bajaj
08/21/2025, 6:57 PMkyle
08/25/2025, 9:08 PM