Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 2441 by [email protected]: When NOTIFY is received before Ok,
remote tag is incorrectly set
http://code.google.com/p/mobicents/issues/detail?id=2441
What steps will reproduce the problem?
1. Client sends SUBSCRIBE
2. Server sends "200 Ok" and NOTIFY (immediately, as required by RFC3265)
3. For some reason, NOTIFY is processed before Ok. According to the 3.1.4.4
of RFC 3265, this is valid scenario.
4. Client processes both.
5. Client sends SUBSCRIBE in the same dialog (for example, with Expires: 0,
to unsubscribe)
What is the expected output? What do you see instead?
As seen from the logs, both tags of last SUBSCRIBE are equal. "To:" tag is
incorrect (it is the same as the client tag).
What version of the product are you using? On what operating system?
mss-1.5.0.FINAL-jboss-jdk6-5.1.0.GA
Please provide any additional information below.
Actually, this is bug in JAIN RI. When request (NOTIFY) is received before
response to the SUBSCRIBE, the following piece of code from the
gov.nist.javax.sip.stack.SIPDialog is executed:
public void setPendingRouteUpdateOn202Response(SIPRequest sipRequest) {
this.pendingRouteUpdateOn202Response = true;
String toTag = sipRequest.getToHeader().getTag();
if (toTag != null) {
this.setRemoteTag(toTag);
}
}
However, since request is received from the remote side (server in our
case), its "To:" header is actually points to client. Tag of the "From:"
header should be used instead (see the patch attached).
Unfortunately, I cannot provide a test, since this situation is difficult
to reproduce. In our environments, it reproduces only on several
development Windows boxes.
Since I was not able to find the sources that are used in Mobicents,
therefore I am posting this bug here.
Mobicents 1.5.0 ships with version 1.2.161, but latest tagged version in
SVN (https://svn.java.net/svn/jsip~svn/trunk) is 1.2.157. Also, Mobicents
version (which I took from Maven 2 repository
http://repository.jboss.org/nexus/content/groups/public-jboss/javax/sip/jain-sip-ri/1.2.162/)
seem to be very different to the version on svn.java.net.
Attachments:
0001-pending-route-update.patch 743 bytes