Stabilize IVR tracing, SIP dialog routing, and audio downloads - #258
Merged
Conversation
- preserve ordered IVR completion and session-end trace metadata - keep explicit dialog targets while routing AoRs, GRUUs, and home proxies - bound complete audio download attempts and retry once with a fresh client - keep HTTP status errors non-retryable and redact URLs from failures
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.
Problem
This PR addresses three reliability issues:
IVR trace events could be reordered because each event was dispatched in a separate asynchronous task. Transfer and phone-input nodes could also advance without
emitting their completion marker, while remote hangups could lose the last node’s metadata.
Dialog routing could select an unrelated registration for the same user and replace an explicit in-dialog Contact.
Audio downloads failed immediately on stale pooled connections. The previous timeout was also too long for call processing, and errors could expose signed URL
parameters.
Changes
Preserve trace enqueue order without serializing downstream event processing.
Emit the existing session_end completion event for transfer and phone-input nodes before moving to the next node. Phone-input details and remote-hangup metadata
are retained.
Select dialog targets by intent: exact Contact, registered AoR, GRUU, WebRTC .invalid Contact, then home proxy. Existing cluster routing and direct URI fallback
remain unchanged.
Limit each audio download attempt to 2 seconds.
Retry transport, body-read, and timeout failures once with a fresh client.
Do not retry HTTP status errors, and redact URLs from download errors.
Compatibility
Verification