Skip to content

Commit 25d0976

Browse files
committed
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.
1 parent 70741e4 commit 25d0976

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sippy/uac_state_idle.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ func (self *UacStateIdle) RecvEvent(_event sippy_types.CCEvent) (sippy_types.UaS
160160
disconnect_ts, _ := sippy_time.NewMonoTime()
161161
self.ua.SetDisconnectTs(disconnect_ts)
162162
}
163-
return NewUaStateDead(self.ua, self.config), func() { self.ua.DiscCb(_event.GetRtime(), _event.GetOrigin(), 0, nil) }, nil
163+
return NewUaStateDisconnected(self.ua, self.config), func() { self.ua.DiscCb(_event.GetRtime(), _event.GetOrigin(), 0, nil) }, nil
164164
}
165165

166166
func (self *UacStateIdle) ID() sippy_types.UaStateID {

0 commit comments

Comments
 (0)