I’m using red5plugin 0.1.10 with Openser and I’ve noticed that when a user logs out his contact is not properly cleaned in Openser (I can see current AOR using openserctl ul show).
With Xlite and SJphone the log out correctly cleans the contact entry.
After a short SIP packets inspection, I’ve noticed that both Xlite and SJphone use the same CallerID in all REGISTER method (Cseq is incremented in each call) for a given user session, while the mjsip library uses a different CallerID for each call (Cseq always starts from 1).
Both behaviors seems consistent with RFC 3261 par. 10.2 (Constructing the REGISTER Request), but with Sparkweb Openser does not properly clean AOR.
I’ve modified SIPRegisterAgent in order to mimic Xlite and SJphone: when the first REGISTER method is called (and mjsip generates a random CallerID), I simply put it in a local variable and reuse it for all subsequent REGISTER invocation (both for session refresh and log out). Cseq is incremented for each call, so it is always unique for a given CallerID.
I attach the modified SIPRegisterAgent class and a message log that explains the new CallerID/Cseq behaviour in a simple login-logout scenario.