Hey Saul,
Thanks for the detailed write-up and the PCAPs, really helped us dig into this quickly.
We traced both calls using the X-Trace-IDs you shared. Your SIP signaling is correct, the INVITE reaches our edge, gets a 200 OK, and your ACK comes through fine. The issue is happening right after that.
Once our system accepts the call, it looks up which assistant should handle the number 526627760699 under your org. That lookup is returning nothing, because 526627760699 hasn't been imported as a phone number in Vapi. The BYO SIP trunk credential handles authentication and routing to our edge, but the DID also needs to exist as a phone number object in your org and be linked to an assistant. Without that, our system has nowhere to route the call and sends BYE.
To fix this, import the DID via the API:
POST
https://api.vapi.ai/phone-number
Authorization: Bearer
{
"provider": "byo-phone-number",
"number": "+526627760699",
"credentialId": "8516b872-087a-48ee-a1b0-c75c91413fe0",
"assistantId": "
"
}
Once that's done, give it a test call and the BYE should stop. Let me know how it goes!
Regards,
Chiranjeet
Vapi Support