Status: Accepted
Owner: [email protected]
CC: jean.deruelle, [email protected]
Labels: Type-Defect Priority-Medium Component-Sip-Servlets
New issue 3153 by [email protected]: Creating REGISTER request does
make session dirty, so updates not replicated
http://code.google.com/p/mobicents/issues/detail?id=3153
What steps will reproduce the problem?
1. Create a SipSession and REGISTER
SipApplicationSession sas = sipFactory.createApplicationSession();
SipServletRequest req = sipFactory.createRequest(sas, "REGISTER",
fromToURI, fromToURI);
// ...//
req.send();
2. After some time, REGISTER must be refreshed. A new REGISTER request is
created on the same SipSession.
SipSession ss = blah, blah;
ss.setInvalidateWhenReady(ss.getInvalidateWhenReady());
SipServletRequest req = ss.createRequest("REGISTER");
// ...//
req.send();
3. The box S1 that was sending REGISTER request leaves the cluster. The box
S2 takes over the timers, app. sessions, etc.
When timeout fires, S2 buils the register with a CSeq = 2, which is
invalid, as it should increment by 1 the last CSeq sent by S1.
4. Investigation has shown that just creating and sending the request does
NOT mark the session as dirty, so the updates (e.g. the new CSeq value) are
not replicated.
Workaround:
By setting a field that marks the session as dirty, the new CSeq value is
replicated.
ss.setInvalidateWhenReady(ss.getInvalidateWhenReady());
SipServletRequest req = ss.createRequest("REGISTER");