Allow the SIP status for a call that rings out to be configured - #785
Open
bowdens wants to merge 2 commits into
Open
Allow the SIP status for a call that rings out to be configured#785bowdens wants to merge 2 commits into
bowdens wants to merge 2 commits into
Conversation
When an inbound call rings for the whole ringing timeout without anything in the room subscribing to the caller's audio, the INVITE was rejected with a hardcoded 486 Busy Here. Carriers treat 486 as a definitive outcome and hand it straight back to the caller, so there is no way to tell an upstream carrier that the call failed on our side and another route should be tried. Which status is right depends on the deployment, and it is not simply a matter of picking a better default: codes that mean "retry me", 503 in particular, invite the carrier to re-send the INVITE repeatedly, making the caller wait out the ringing timeout once per attempt. Add a ringing_timeout_status option to choose the status. It defaults to 486, so behaviour is unchanged unless it is set. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #785 +/- ##
==========================================
+ Coverage 65.25% 66.83% +1.58%
==========================================
Files 51 41 -10
Lines 6588 8106 +1518
==========================================
+ Hits 4299 5418 +1119
- Misses 1915 2201 +286
- Partials 374 487 +113 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Nothing covered the response to an inbound call that rings for the whole ringing timeout without the room ever subscribing, in either the default or the configured case. Reuse the existing ringForever test room, which already skips the room's subscribed signal, and let NewServiceTest take a handler so the dispatch can return a short ringing timeout. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, when a call rings out after the ringing period the
INVITEis rejected with a486 Busy Here.It would be convenient in our use case to allow a different code, such as a
503 Service Unavailableto be sent instead so that twilio fails over - it doesn't fail over on a 486.This PR adds a
ringing_timeout_statusoption which defaults to the current 486.