Skip to content

fix(rwi): start talk time when an originate is answered - #308

Merged
yeoleobun merged 1 commit into
restsend:mainfrom
jsmey7:fix/originate-answer-time
Nov 19, 2026
Merged

yeoleobun merged 1 commit into
restsend:mainfrom
jsmey7:fix/originate-answer-time

Conversation

@jsmey7

@jsmey7 jsmey7 commented Nov 19, 2026

Copy link
Copy Markdown

A call started with call.originate reports duration_secs: 0 in its call_hangup event, however long the callee talked.

The session's hangup duration comes from meta.answer_time. Inbound calls set it in accept_call, but the originate path attaches the answered dialog through attach_caller_dialog and never sets it, so the duration falls back to 0. CDRs are unaffected because the originate task tracks its own answer time.

This sets answer_time in attach_caller_dialog when it is still empty.

Test: rwi_originate_attach_starts_talk_time attaches an answered originate dialog and checks that talk time has started. It fails without the change.

@yeoleobun
yeoleobun merged commit 17c3a0e into restsend:main Nov 19, 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.

2 participants