Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/sip/inbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ func (c *inboundCall) closeWithCancelled() {
c.state.DeferUpdate(func(info *livekit.SIPCallInfo) {
info.DisconnectReason = livekit.DisconnectReason_CLIENT_INITIATED
})
c.close(false, CallHangup, "cancelled")
c.close(false, CallCancelled, "cancelled")
}

func (c *inboundCall) closeWithHangup() {
Expand Down Expand Up @@ -1317,7 +1317,6 @@ func (c *sipInbound) StartRinging() {
case r := <-cancels:
close(c.cancelled)
_ = tx.Respond(sip.NewResponseFromRequest(r, sip.StatusOK, "OK", nil))
c.RespondAndDrop(sip.StatusRequestTerminated, "Request Terminated")
return
case <-ticker.C:
}
Expand Down
5 changes: 5 additions & 0 deletions pkg/sip/participant.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ func (v CallStatus) Attribute() string {
return "active"
case CallHangup:
return "hangup"
case CallCancelled:
return "cancelled"
}
}

Expand All @@ -89,6 +91,8 @@ func (v CallStatus) SIPStatus() (sip.StatusCode, string) {
switch v {
default:
return sip.StatusBusyHere, "Rejected"
case CallCancelled:
return sip.StatusRequestTerminated, "RequestTerminated"
case callMediaFailed:
return sip.StatusNotAcceptableHere, "MediaFailed"
}
Expand All @@ -101,6 +105,7 @@ const (
CallRinging
CallAutomation
CallActive
CallCancelled
CallHangup
callUnavailable
callRejected
Expand Down