Skip to content

Support name-addr Refer-To headers#116

Merged
shenjinti merged 1 commit intorestsend:mainfrom
yeoleobun:codex/refer-to-name-addr
Apr 20, 2026
Merged

Support name-addr Refer-To headers#116
shenjinti merged 1 commit intorestsend:mainfrom
yeoleobun:codex/refer-to-name-addr

Conversation

@yeoleobun
Copy link
Copy Markdown
Collaborator

What changed

This updates the dialog refer() APIs to accept full Refer-To header values instead of only Uri inputs.

  • widen refer() to accept impl Into<crate::sip::ReferTo> across dialog types
  • add From<crate::sip::Uri> for ReferTo so existing URI callers still serialize as <sip:...>
  • add focused tests for both URI compatibility and raw name-addr input

Why it changed

Issue #115 points out that RFC 3515 allows Refer-To to carry the full name-addr form, including an optional display name and parameters. The previous API only accepted Uri and always forced Refer-To into "<uri>", which prevented callers from supplying valid name-addr values.

Impact

  • existing callers that pass Uri continue to work unchanged
  • callers can now pass a full Refer-To value such as "Display Name" <sip:user@domain.com;method=INVITE?Replaces=...>
  • downstream REFER-related tests in sibling repos continue to pass against this local branch

Root cause

The REFER helpers modeled Refer-To as a URI-only input even though the header syntax is wider than a bare URI.

Validation

  • cargo test --lib
  • cargo test refer in active-call
  • cargo test test_inbound_refer_success --lib in rustpbx
  • cargo test --test rwi_transfer_refer_e2e_test in rustpbx

Closes #115.

@yeoleobun yeoleobun marked this pull request as ready for review April 20, 2026 02:01
@yeoleobun yeoleobun force-pushed the codex/refer-to-name-addr branch from 6121a72 to 20870e6 Compare April 20, 2026 02:05
@yeoleobun yeoleobun changed the title [codex] Support name-addr Refer-To headers Support name-addr Refer-To headers Apr 20, 2026
@shenjinti shenjinti merged commit 4807cd3 into restsend:main Apr 20, 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.

Refer-To should allow for name-addr

2 participants