For a normal authentication flow, the SipStream is calculating the state of the call wrong. At the time it gets the 401/407 response it will move the state of the call over to REJECTED (should probably be un-authenticated instead) but if we get an INVITE that actually goes through ok then the state is still left at REJECTED. Suggestion: new state "UNAUTHORIZED" and the state machine allows for transitioning from this state back to whatever we have for the initial INVITE
For a normal authentication flow, the SipStream is calculating the state of the call wrong. At the time it gets the 401/407 response it will move the state of the call over to REJECTED (should probably be un-authenticated instead) but if we get an INVITE that actually goes through ok then the state is still left at REJECTED. Suggestion: new state "UNAUTHORIZED" and the state machine allows for transitioning from this state back to whatever we have for the initial INVITE