As I recently reported in some previous messages, there is a problem when using handleChallenge from the SipSecurityManager.
I don't understand exactly why this problem occur and I need your help to correct it.
When we receive a 401/407 message, the sip stack doesn't close the transaction. When we call the handleChallenge method, a new client transaction is created and it's of course this one which will be closed when the authentication process ends. But the first transaction remain active and timeout occurs and the message is resend again and again.
I've successfully tested to explicitly close the first transaction right after the creation of the new transaction by handleChallenge.
Here are my questions :
- first, where do we have to close the initial transaction ? in handleChallenge or after we call this method ? Doesn't this problem occur elsewhere in the SIP implementation ?
- second, just for curiosity, why the message resend using the initial transaction is the one created by handleChallenge (and absolutely not associated with the initial transaction but with the new one) ?