Hi there! 👋
I understand you're experiencing unwanted call retries after rejection with your Vapi → SIP Trunk integration. Let me help clarify what might be happening.
Based on the information I found, Vapi did have an automatic retry mechanism that would retry calls indefinitely when the receiving end rejected a call, particularly when using a "byo phone number" and "byo sip trunk" setup. According to [this source](
https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1338810971153760296), this issue has been resolved, though the specific details of the resolution aren't provided.
Here are some potential ways to prevent these unwanted retries:
1. **Handle rejections at the telephony level**: According to [this information](
https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333545965734592626), you can handle call rejections at the telephony level (SIP provider) to prevent calls from reaching the Vapi assistant. If a call is not allowed (e.g., outside business hours or from a blocked number), end the call at the telephony level rather than forwarding it to Vapi.
2. **Enable end call function**: Try setting
endCallFunctionEnabled
to true using the dashboard, as suggested in [this source](
https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1313293840580612166).
3. **Implement additional logic**: As a temporary workaround, consider implementing additional logic in your event handling to determine the hangup source based on other call details or states, as mentioned in [this source](
https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1316958070177403011).
4. **Check your configuration**: Ensure that your SIP trunk is properly configured with Vapi and that you have the correct settings for call handling.
Would you like me to provide more details on any of these potential solutions?
Sources: