Issue 351: B2buaHelper session cloning and linkage not working
http://code.google.com/p/mobicents/issues/detail?id=351

New issue report by [EMAIL PROTECTED]:
I suspect that the B2buaHelper is not doing what it should regarding
derived SipSessions. My servlet acts as a B2BUA that does the following:

* Receives an INVITE as UAS.
* Relays it using B2buaHelper.createRequest(origRequest, ...) to
proxy1.example.org.
* Receives a 401 Unauthorized from proxy1.example.org.
* Calls B2buaHelper.createRequest() again, adds authentication info and
sends the new request.
* Receives a 200 OK from proxy1.example.org.

Now it is supposed to relay the OK to the UAC. This code in
doSuccessResponse() should work, I think, but doesn't:

    B2buaHelper helper = resp.getRequest().getB2buaHelper();
    SipSession originalSession =
        helper.getLinkedSession(resp.getSession());

Here getLinkedSession() returns null. This is because resp.getSession() is
a cloned session - it has the same session key but is a different object
and hence not found by the map lookup in getLinkedSession().

However this does work:

    SipSession originalSession =
        helper.getLinkedSession(resp.getRequest().getSession());

Here we look up the original session that is still associated to the
request object. It seems to me that both version should work according to
the spec Section 12.5.1 "Cloning and Linking".

Possibly the B2buaHelper's sessionMap should be keyed on the session key,
not the session object.

Using Mobicents Sip Servlets 0.6-SNAPSHOT (Tomcat).



Issue attributes:
        Status: New
        Owner: ----
        Labels: Type-Defect Priority-Medium

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

Reply via email to