feat(sip): M7 CP2 — apply from_user/from_domain to the origination From - #158
Merged
Conversation
`build_invite_with_uri` hardcoded `sip:asterisk@<bind>` in the From, so a carrier that authorizes by caller identity (Chime rejects a From that is not a DID we own) could never be satisfied. Apply the endpoint's `from_user`/ `from_domain` to the outbound From (INVITE and in-dialog BYE), falling back to `asterisk` @ the signalling host:port when unset. - session: `from_uri()` builds `sip:user@domain`; used by `build_invite_with_uri` and `build_bye` so the From identity stays stable across the dialog. New `from_user`/`from_domain` session fields. Contact still advertises the reachable `asterisk@<sig>` (reachability, not identity). - channel_driver: resolve the endpoint's from_user/from_domain onto the outbound session (mirroring outbound_auth). Proofs: session cp2_tests (From carries user@domain; user-only keeps the signalling domain; unset -> asterisk; BYE From matches). RED-capable: revert -> `sip:asterisk@<bind>`. tests/cp2-from-identity — isolated offline-carrier harness asserting the captured INVITE From URI is exactly the configured identity (receiver-side). Captured RED: reverting yields `sip:asterisk@0.0.0.0:15060`.
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.
M7 CP2 — apply from_user/from_domain to the origination From
build_invite_with_urihardcodedsip:asterisk@<bind>in the From. A carrierthat authorizes by caller identity (Chime rejects a From that is not a DID we
own) could never be satisfied. This applies the endpoint's
from_user/from_domainto the outbound From — INVITE and in-dialog BYE — falling back toasterisk@ the signalling host:port when unset. Contact still advertises thereachable
asterisk@<sig>(reachability, not identity).Receiver-side proof (isolated offline-carrier harness)
tests/cp2-from-identity/run.sh— the offline carrier captures the outboundINVITE and the harness asserts its From URI:
Decisive RED
Revert the From to
sip:asterisk@{sig}→ the carrier capturesfrom_uri=sip:asterisk@0.0.0.0:15060→ result: FAIL.Unit tests (RED-capable)
session::cp2_tests: From carries user@domain; user-only keeps the signallingdomain; unset →
asterisk; BYE From matches the configured identity.cargo test --workspace --exclude pjsip-shim+clippy … -D warningsgreen.Rust 1.97.0.