Skip to content

fix(calls): close the caller's own stale active call on redial - #15

Merged
Frekion2002 merged 1 commit into
mainfrom
fix/redial-stale-call-20261117
Nov 17, 2026
Merged

Frekion2002 merged 1 commit into
mainfrom
fix/redial-stale-call-20261117

Conversation

@Frekion2002

Copy link
Copy Markdown
Collaborator

무엇

  • POST /v1/calls: 전화를 거는 사람이 아직 들어 있는 진행 중(ACTIVE) 통화가 있으면, 새 통화를 예약하기 전에 그 통화를 finish 한다(방 삭제 포함 → 남아 있던 상대도 그 통화에서 풀림).
  • 울리는 중(CREATED/RINGING) 통화는 그대로 둔다(지금처럼 409). 받는 사람이 아직 방에 없어 「옛 통화가 끝났다」는 신호가 가지 않아, 새 전화를 거절할 가능성이 크기 때문.

왜

  • 11-16 팀원 아이폰 실기: 통화 중 앱을 위로 밀어 강제 종료하면 상대는 소리 없는 통화에 남고, 다시 앱을 열어 걸면 「본인 또는 상대방이 이미 통화 중입니다」(409).
  • 강제 종료된 앱은 /end 를 보낼 수 없고, LiveKit 이 참가자를 빼기까지 약 21초가 걸린다(로컬 livekit-server 1.13.10 + 운영 방 설정으로 3회 측정, departure_timeout 을 5초로 바꿔도 같음). 그 사이 다시 걸면 409.
  • 앱은 통화 중에 새로 걸 수 없으므로, 거는 사람이 들어 있는 ACTIVE 통화는 끝을 알리지 못한 통화다.

확인

  • 테스트 447 통과(새 테스트 2개: 강제 종료 뒤 다시 걸기 = 201 + 옛 통화 ended_at·room_closed_at, 울리는 중 다시 걸기 = 409). 새 테스트는 고친 줄을 빼면 실패함을 확인.
  • ruff 통과, 통화 시나리오(가짜 모드) 실패 0.
  • 남은 위험: 상대 앱이 방 삭제보다 새 수신 알림을 먼저 처리하면 새 전화를 거절할 수 있음(두 앱 모두 통화 중 새 수신은 거절) — 그때는 한 번 더 걸면 됨.

When the app is force-quit mid-call it cannot report the end, and LiveKit
takes about 20 seconds to drop the participant (measured locally on
1.13.10 with the production room settings; departure_timeout does not
change it). Redialing in that window hit 409 and the other person stayed
in a silent call. The app cannot start a call while it is in one, so an
ACTIVE call the caller is still part of is stale: finish it (which also
deletes the room and frees the other side) before reserving the new call.
Ringing calls are left alone because the callee is not in the room yet and
would not learn that the old call ended.
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