Presence: 500 Invalid CSeq after subscription renewal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 30, 2008 at 4:16 AM, Ramzi Touma <rtt00 at aub.edu.lb> wrote:
>
> Hi,
>
> I am trying to get the SIMPLE presence of pjsip to work properly with
> openser as presence. I am, however, facing problems with presence! I am not
> sure whether the problem is from pjsip or from openser. I know pjsip has
> been tested for presence functionality but I think there is still something
> wrong, correct me if I am wrong:
>
> Here is a scenario I tried many times to finally acknowledge my observation.
> (I set pjsip to PUBLISH its status to the presence server).
>
> At first as seen in the diagram below, subscriber "A" requests a
> subscription from the openser server to the presence of buddy "B". The
> server responds with a 202 OK and then a valid NOTIFY. notice the sequence
> numbers (CSeq). On the second subscription request (in 600 seconds as set in
> pjsip) "A" renews its subscription and everything goes well (again notice
> the CSeqs). Now when Buddy B goes online (or publishes something)   the
> server sends a notify to subscriber "A". Notice the CSeq keeps on
> increasing; here comes our problem. When Pjsip renews its subscription once
> again, the old CSeq (of NOTIFY[2]) is used. The server however responds with
> a notify message with a later CSeq (the correct one I guess) causing the
> pjsip application to responds with a "500 Invalid CSeq message".
>

Actually it's the CSeq from server that seems to be wrong. Remember
that the CSeq sequence of the two directions in a dialog are
independent from one another, so the CSeq of SUBSCRIBE is increased
independently from the CSeq of NOTIFY. So for your case, PJSIP expects
the CSeq of the NOTIFY to contain 8948 or bigger, hence pjsip
responded with 500 response.

Could it be that the server was restarted between subscription
refreshes? If this is the case then the server should respond the
SUBSCRIBE refresh with 481 (Call/Transaction Does Not Exist) response.
Maybe there's something that can be tuned in the configuration?

Cheers
 Benny

>
> What appears is that Pjsip is not keeping track of CSeq numbers not related
> directly to its subscribe messages. i.e. if it receives NOTIFY messages
> resulting from buddy publishes and not from its own subscribe requests. Is
> this really a problem in pjsip or is it the other way around (openser) ?
>
>
>
> So as I see it, presence in pjsip works properly until the first
> subscription renewal. (i.e. 600 seconds if kept as default)
>
>
>
> Hope I made myself clear. Looking forward for your help and feedback.
> Thanks.
>
>
>
> Regards,
>  Ramzi
>
>
>
> (Assume proper receipt of 200 messages, I didn't draw them on this diagram)
>
>
>
>
>
>
> Subsriber "A"
>
> Openser
>
> Buddy  "B"
>
>
>
>
> |
>
>
>
>
>
>
> |
>
>
>
>
> SUBSCRIBE[1]: 8942
>
> |
>
>
>
>
> -------------------------------------->
>
> |
>
>
>
>
>
>
> |
>
>
>
>
> NOTIFY[1]: 8943
>
> |
>
>
>
>
> <------------------------------------
>
> |
>
>
>
>
>
>
> |
>
>
>
>
>
>
> |
>
>
>
>
> SUBSCRIBE[2]: 8943 (refresh)
>
> |
>
>
>
>
> -------------------------------------->
>
> |
>
>
>
>
>
>
> |
>
>
>
>
> NOTIFY[2]: 8944
>
> |
>
>
>
>
> <--------------------------------------
>
> |
>
>
>
>
>
>
> |
>
>
>
>
>
>
> |
>
>
>
>
>
>
> |
>
> PUBLISH[1]: (e.g: online)
>
>
> NOTIFY[3]: 8945
>
> |
>
> <--------------------------------------
>
>
> <--------------------------------------
>
> |
>
>
>
>
>
>
> |
>
> PUBLISH[2]: (e.g: busy)
>
>
> NOTIFY[4]: 8946
>
> |
>
> <--------------------------------------
>
>
> <--------------------------------------
>
> |
>
>
>
>
>
>
> |
>
> PUBLISH[3] (e.g: away)
>
>
> NOTIFY[5]: 8947
>
> |
>
> <---------------------------------------
>
>
> <--------------------------------------
>
> |
>
>
>
>
>
>
> |
>
>
>
>
> SUBSCRIBE[3]: 8944
>
> |
>
>
>
>
> -------------------------------------->
>
> |
>
>
>
>
>
>
> |
>
>
>
>
> NOTIFY[6]: 8945
>
> |
>
>
>
>
> <--------------------------------------
>
> |
>
>
>
>
>
>
> |
>
>
>
>
> NOTIFY[7]: Invalid CSeq !!!
>
> |
>
>
>
>
> ------------------------------------->
>
> |
>
>
>
>
>
> Legend:
>
> METHOD[occurrence #]: CSeq
>
>
>
>
>
>
>
>
>
> Ramzi T. Touma
>
> Electrical and Computer Engineering
>
> American University of Beirut
>
> Email: rtt00 at aub.edu.lb
>
>
> _______________________________________________
>  Visit our blog: http://blog.pjsip.org
>
>  pjsip mailing list
>  pjsip at lists.pjsip.org
>  http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux