Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Component-Sip-Servlets MSS-3.0.0.FINAL
Roadmap-Fix
New issue 247 by [email protected]: mobicents does not handle doAck
properly when security is enabled
http://code.google.com/p/sipservlets/issues/detail?id=247
What steps will reproduce the problem?
1. Create a sip servlet with security constraints
2. A client sends an INVITE to the servlet
3. The server answers with a 401 Unauthorized
4. The client resend the INVITE with credentials
5. The servlet replies with a 200 OK
6. The client sends an ACK
7. Nothing happens. Mobicents does not execute the doAck method in the
servlet.
What version of the product are you using? On what operating system?
mss-2.0.0.FINAL-jboss-as-7.1.2.Final
Please provide any additional information below.
I've attached a simple project that proves this bug.
ackbug.zip contains a simple sip servlet with security settings in sip.xml
If you remove security constraint from sip.xml the doAck method is executed.
acktest.zip is a sip unit test that acts as a client.
log_without_security is the log of the server when security is disabled.
log_with_security is the log of the server when security is enabled.
I tried to modify the server logic in order to force mobicents to enter the
doAck. Particularly I've changed the SipSessionImpl#isAckReceived method
(since the log says "isAckReceived for CSeq 2: null").
What I discovered was that the Sip Application Session of the ACK is
different from the SAS of the INVITE when security is enabled.
When authorization is needed the client must send two INVITE. The first
without the Authenticate header (followed by an ACK) and a second with the
Authenticate header. It seems that the second ACK sent by the client has
the same SAS of the first INVITE.
CLIENT ----INVITE----> SERVER (mobicents create a new SAS: SAS1)
CLIENT <-----401------ SERVER
CLIENT ------ACK-----> SERVER
CLIENT ----INVITE----> SERVER (mobicents create a new SAS: SAS2)
CLIENT <-----200------ SERVER
CLIENT ------ACK-----> SERVER (mobicents uses SAS1 to find if the ACK is
already received)
You can see this in log_with_security_2 file.
Attachments:
ackbug.zip 5.8 KB
acktest.zip 6.2 KB
log_without_security 44.1 KB
log_with_security 83.7 KB
log_with_security_2 89.9 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
---
You received this message because you are subscribed to the Google Groups "mobicents-all-issues-changes" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.