Skip to content

TEL-1072: emit auth, dispatch, ACK, CANCEL, rejection and BYE signaling events - #915

Merged
hechen-eng merged 8 commits into
mainfrom
events-inbound
Oct 24, 2026
Merged

hechen-eng merged 8 commits into
mainfrom
events-inbound

Conversation

@hechen-eng

@hechen-eng hechen-eng commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Problem. Inbound signaling events stop at the main setup steps. There is no event for the auth and dispatch lookups, the ACK, a CANCEL, a rejected INVITE or the BYE.

Change. Emit seven more events: sip.invite.authorized and sip.call.dispatched (lookup result and duration, from the existing get-auth and eval-dispatch stage timers), sip.ack.received, sip.cancel.received, sip.rejected (every final non-2xx response to the INVITE), sip.bye.received (only the Reason header's protocol and cause, not its free text) and sip.bye.sent (outcome, status and response time). SignalingEvent gets Duration, DispatchRuleID and WithPIN (a PIN call is dispatched twice), and Result now means the outcome of the step.

The SIP leg holds the call state, so ACK, CANCEL, rejections and our BYE are reported where they are sent or received, including rejections before a call exists. The ACK and CANCEL events are emitted after the call is signalled, because emitting can wait on the call state's lock during a flush. The shared sendBye now returns the response and error; outbound ignores them.

devin-ai-integration[bot]

This comment was marked as resolved.

@alexlivekit alexlivekit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No outbound?

Comment thread pkg/sip/inbound.go
Comment thread pkg/sip/inbound.go
@hechen-eng

Copy link
Copy Markdown
Contributor Author

No outbound?

follow up PRs: transfer, outbound.. I wanted to control the volume of the events for now

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@alexlivekit alexlivekit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If outbound is a follow up PR, then we're happy.

devin-ai-integration[bot]

This comment was marked as resolved.

@hechen-eng
hechen-eng merged commit d020a38 into main Oct 24, 2026
8 checks passed
@hechen-eng
hechen-eng deleted the events-inbound branch October 24, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants