Skip to content

Stabilize IVR tracing, SIP dialog routing, and audio downloads - #258

Merged
yeoleobun merged 1 commit into
restsend:mainfrom
dengxiayehu:fix/e2e_issue
Aug 25, 2026
Merged

Stabilize IVR tracing, SIP dialog routing, and audio downloads#258
yeoleobun merged 1 commit into
restsend:mainfrom
dengxiayehu:fix/e2e_issue

Conversation

@dengxiayehu

Copy link
Copy Markdown
Contributor

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

  • Keeps the existing session_end trace contract; no new step_complete event is introduced.
  • Does not change public APIs or serialize the full call-processing path.
  • Explicit SIP targets and existing cluster behavior are preserved.

Verification

  • 41 audio-source tests passed, including stale connections, partial bodies, timeouts, non-retryable HTTP errors, and URL redaction.
  • 10 dialog-target locator tests passed, covering Contacts, AoRs, GRUUs, home proxies, and case-sensitive SIP users.
  • 4 IVR trace contract tests passed, covering ordering, transfer completion, phone-input completion, and remote hangup metadata.
  • Release-profile Cargo check with commerce,contact-center passed.

- 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
@yeoleobun
yeoleobun merged commit 8dcb59c into restsend:main Aug 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants