Clear stale unanswered calls before new invite
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user