Strange "Out of order request"

43 views
Skip to first unread message

breeze

unread,
Jul 26, 2011, 4:29:43 AM7/26/11
to cipango-users
Hello

I've got a strange (imho) "Out of order request". Situation is:
* Servlet(AS) receive INVITE from user, it send 200, and receive ACK,
so session is established correctly
* AS receive SUBSCRIBE from user within this session (callid, from/to
tags), AS send 200 and try to create a NOTIFY request within this
session:

// SipServletRequest request - from doSubscribe
SipSession session = request.getSession();
String xmlContent = "...";
SipServletRequest notifyRequest = session.createRequest("NOTIFY");
notifyRequest.setContent(xmlContent, "text/plain");
notifyRequest.send();

As I see in pcap trace, AS send this NOTIFY to itself, not to user. So
AS receive NOTIFY with wrong CSEQ. Is it correct way to create request
that should be routed to user?

Thomas

unread,
Jul 26, 2011, 4:49:12 AM7/26/11
to cipang...@googlegroups.com
Hello,

Your code snippet looks perfectly valid. Could you send us the messages log (pcap trace or message.log) ?

Regards,

Thomas

> --
> You received this message because you are subscribed to the Google Groups "cipango-users" group.
> To post to this group, send email to cipang...@googlegroups.com.
> To unsubscribe from this group, send email to cipango-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cipango-users?hl=en.
>

Ilya Korolev

unread,
Jul 26, 2011, 5:06:09 AM7/26/11
to cipang...@googlegroups.com
Pcap is in attach

There is a line in my code:
protected void doResponse(SipServletResponse sipServletResponse) throws ServletException, IOException {
..
logger.debug("doResponse() conference={}, response - {}", conferenceData, sipServletResponse);

And I see in log:
2011-07-26 12:18:40,523 DEBUG qtp20812788-43 r.t.m.s.MainServlet:doResponse:177 - doResponse() conference=c06258, response - SIP/2.0 500 Error in handler: Out of order request
Via: SIP/2.0/UDP 192.168.64.43:5060;branch=z9hG4bKeca0c12eb79e
From: conference <sip:confe...@multifon.ru>;tag=eb35da3a
To: 79261234567 <sip:79261...@multifon.ru>;tag=b7035857
Call-ID: MWQwYjVkOWM4NTI2MDFiM2UyNGRjZjU5NDMxOTMyYWE.
CSeq: 1 NOTIFY
Content-Length: 1217
Content-Type: text/plain

Exception while handling request: org.cipango.sip.SipException: Out of order request
at org.cipango.server.session.Session$UA.handleRequest(Session.java:919)
at org.cipango.server.session.Session.handleRequest(Session.java:490)
at org.cipango.server.session.SipSessionHandler.handleRequest(SipSessionHandler.java:130)
at org.cipango.server.session.SipSessionHandler.handle(SipSessionHandler.java:57)
at org.cipango.server.transaction.TransactionManager.handleRequest(TransactionManager.java:110)
at org.cipango.server.transaction.TransactionManager.handle(TransactionManager.java:41)
at org.cipango.server.session.CallSessionHandler$Queue.handle(CallSessionHandler.java:187)
at org.cipango.server.session.CallSessionHandler.handle(CallSessionHandler.java:103)
at org.cipango.server.handler.SipContextHandlerCollection.handle(SipContextHandlerCollection.java:274)
at org.cipango.server.Server.handle(Server.java:245)
at org.cipango.server.ConnectorManager.handle(ConnectorManager.java:240)
at org.cipango.server.AbstractSipConnector$MessageTask.run(AbstractSipConnector.java:402)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
at java.lang.Thread.run(Thread.java:662)

26.07.2011, 12:49, "Thomas" <tho...@cipango.org>:

dump.pcap

Thomas

unread,
Jul 26, 2011, 5:55:24 AM7/26/11
to cipang...@googlegroups.com
The issue is that the SUBSCRIBE request sent by the UA (192.168.7.51) contains a Contact pointing to cipango. As the SUB is a target refresh request, it updates the contact information (used later to build request URI) of the dialog created by the INVITE.
As a result, the NOTIFY created by cipango is sent the address specified by the Contact URI i.e. itself.

It seems then that the UA built an invalid SUBSCRIBE request.

Regards,

> <dump.pcap>

breeze

unread,
Jul 26, 2011, 6:07:49 AM7/26/11
to cipango-users
Thanks a lot!
It's a script in this case, so it's easy to fix it

On Jul 26, 1:55 pm, Thomas <tho...@cipango.org> wrote:
> The issue is that the SUBSCRIBE request sent by the UA (192.168.7.51) contains a Contact pointing to cipango. As the SUB is a target refresh request, it updates the contact information (used later to build request URI) of the dialog created by the INVITE.
> As a result, the NOTIFY created by cipango is sent the address specified by the Contact URI i.e. itself.
>
> It seems then that the UA built an invalid SUBSCRIBE request.
>
> Regards,
>
> Le 26 juil. 2011 à 11:06, Ilya Korolev a écrit :
>
>
>
>
>
>
>
> > Pcap is in attach
>
> > There is a line in my code:
> > protected void doResponse(SipServletResponse sipServletResponse) throws ServletException, IOException {
> > ..
> > logger.debug("doResponse() conference={}, response - {}", conferenceData, sipServletResponse);
>
> > And I see in log:
> > 2011-07-26 12:18:40,523 DEBUG qtp20812788-43 r.t.m.s.MainServlet:doResponse:177 - doResponse() conference=c06258, response - SIP/2.0 500 Error in handler: Out of order request
> > Via: SIP/2.0/UDP 192.168.64.43:5060;branch=z9hG4bKeca0c12eb79e
> > From: conference <sip:confere...@multifon.ru>;tag=eb35da3a
> > To: 79261234567 <sip:79261234...@multifon.ru>;tag=b7035857
> > Call-ID: MWQwYjVkOWM4NTI2MDFiM2UyNGRjZjU5NDMxOTMyYWE.
> > CSeq: 1 NOTIFY
> > Content-Length: 1217
> > Content-Type: text/plain
>
> > Exception while handling request: org.cipango.sip.SipException: Out of order request
> >        at org.cipango.server.session.Session$UA.handleRequest(Session.java:919)
> >        at org.cipango.server.session.Session.handleRequest(Session.java:490)
> >        at org.cipango.server.session.SipSessionHandler.handleRequest(SipSessionHandle r.java:130)
> >        at org.cipango.server.session.SipSessionHandler.handle(SipSessionHandler.java: 57)
> >        at org.cipango.server.transaction.TransactionManager.handleRequest(Transaction Manager.java:110)
> >        at org.cipango.server.transaction.TransactionManager.handle(TransactionManager .java:41)
> >        at org.cipango.server.session.CallSessionHandler$Queue.handle(CallSessionHandl er.java:187)
> >        at org.cipango.server.session.CallSessionHandler.handle(CallSessionHandler.jav a:103)
> >        at org.cipango.server.handler.SipContextHandlerCollection.handle(SipContextHan dlerCollection.java:274)
> >        at org.cipango.server.Server.handle(Server.java:245)
> >        at org.cipango.server.ConnectorManager.handle(ConnectorManager.java:240)
> >        at org.cipango.server.AbstractSipConnector$MessageTask.run(AbstractSipConnecto r.java:402)
> >>>  For more options, visit this group athttp://groups.google.com/group/cipango-users?hl=en.
> >> --
> >> You received this message because you are subscribed to the Google Groups "cipango-users" group.
> >> To post to this group, send email to cipang...@googlegroups.com.
> >> To unsubscribe from this group, send email to cipango-user...@googlegroups.com.
> >> For more options, visit this group athttp://groups.google.com/group/cipango-users?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups "cipango-users" group.
> > To post to this group, send email to cipang...@googlegroups.com.
> > To unsubscribe from this group, send email to cipango-user...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/cipango-users?hl=en.
>
> > <dump.pcap>
Reply all
Reply to author
Forward
0 new messages