From 25d09767a97c658ef919c532f5062bc256cb80fd Mon Sep 17 00:00:00 2001 From: Maksym Sobolyev Date: Fri, 25 Oct 2024 20:40:45 -0700 Subject: [PATCH] Don't go from Idle(UAC) straight to the Dead state. The problem with that, is Dead's OnActivate() cleans up all callback pointers, thus making a subsequent self.ua.DiscCb() effectively a NOP. When external media relay is active, we can be staying in the Idle(UAC) state for an extended amount of time, waiting for the remote rtpproxy to complete a request. --- sippy/uac_state_idle.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sippy/uac_state_idle.go b/sippy/uac_state_idle.go index ce0aa65..a42d4e4 100644 --- a/sippy/uac_state_idle.go +++ b/sippy/uac_state_idle.go @@ -160,7 +160,7 @@ func (self *UacStateIdle) RecvEvent(_event sippy_types.CCEvent) (sippy_types.UaS disconnect_ts, _ := sippy_time.NewMonoTime() self.ua.SetDisconnectTs(disconnect_ts) } - return NewUaStateDead(self.ua, self.config), func() { self.ua.DiscCb(_event.GetRtime(), _event.GetOrigin(), 0, nil) }, nil + return NewUaStateDisconnected(self.ua, self.config), func() { self.ua.DiscCb(_event.GetRtime(), _event.GetOrigin(), 0, nil) }, nil } func (self *UacStateIdle) ID() sippy_types.UaStateID {