Skip to content

WPB-27891: fix: resolve original caller for call-end "called" message - #199

Open
blackheaven wants to merge 1 commit into
mainfrom
gdifolco/fix-original-caller
Open

WPB-27891: fix: resolve original caller for call-end "called" message#199
blackheaven wants to merge 1 commit into
mainfrom
gdifolco/fix-original-caller

Conversation

@blackheaven

@blackheaven blackheaven commented Aug 4, 2026

Copy link
Copy Markdown

https://wearezeta.atlassian.net/browse/WPB-27891

Call-end surfaces attributed the message to whoever sent the end/missed-trigger message rather than the original caller, because AVS reported the OTR envelope sender of whichever message triggered each callback (incomingh -> SETUP sender = caller, but closeh/ missedh -> end-message sender, usually not the caller).

Persist the SETUP/CONF_START envelope sender (the server-authenticated original caller) for the call lifetime and report it on the close/leave/missed callbacks instead of the end-message sender.

In the NSE event path, a SETUP-triggered event uses the authenticated envelope sender (which IS the caller); the self-declared src_userid from the decoded econn_message is used only for the CONF_END->CLOSED fallback, where no SETUP was seen and there is no better signal, falling back to the envelope sender when src_userid is absent.

Outgoing calls keep the existing self fallback (no SETUP is seen, so self is the caller).

It's LLM-generated, please, review it carefully.

https://wearezeta.atlassian.net/browse/WPB-27891

Call-end surfaces attributed the message to whoever sent the
end/missed-trigger message rather than the original caller, because
AVS reported the OTR envelope sender of whichever message triggered
each callback (incomingh -> SETUP sender = caller, but closeh/
missedh -> end-message sender, usually not the caller).

Persist the SETUP/CONF_START envelope sender (the server-authenticated
original caller) for the call lifetime and report it on the
close/leave/missed callbacks instead of the end-message sender.

In the NSE event path, a SETUP-triggered event uses the authenticated
envelope sender (which IS the caller); the self-declared src_userid
from the decoded econn_message is used only for the CONF_END->CLOSED
fallback, where no SETUP was seen and there is no better signal,
falling back to the envelope sender when src_userid is absent.

Outgoing calls keep the existing self fallback (no SETUP is seen, so
self is the caller).
@blackheaven
blackheaven force-pushed the gdifolco/fix-original-caller branch from f92caa2 to 0f23b25 Compare August 7, 2026 15:30
@blackheaven blackheaven changed the title fix: resolve original caller for call-end "called" message WPB-27891: fix: resolve original caller for call-end "called" message Aug 7, 2026
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.

1 participant