Clear stale unanswered calls before new invite

This commit is contained in:
richjohnrambo
2026-09-04 18:16:26 +08:00
parent 4ad6ca00b4
commit b4d3fbe359
4 changed files with 53 additions and 2 deletions
+12
View File
@@ -1634,6 +1634,18 @@ func ErrCallBusyReply(msg *ClientComMessage, ts time.Time) *ServerComMessage {
return ErrCallBusyExplicitTs(msg.Id, msg.Original, ts, msg.Timestamp)
}
func ErrCallBusyWithCallReply(msg *ClientComMessage, ts time.Time, call *videoCall) *ServerComMessage {
reply := ErrCallBusyReply(msg, ts)
if call != nil {
reply.Ctrl.Params = map[string]any{
"seq": call.seq,
"call_id": call.callID,
"call_type": call.callType,
}
}
return reply
}
// ErrUnknown database or other server error (500).
func ErrUnknown(id, topic string, ts time.Time) *ServerComMessage {
return ErrUnknownExplicitTs(id, topic, ts, ts)