Skip to content

Commit 81d0308

Browse files
committed
ensures proper toTag is set form dialog. This is key to support forked responses
1 parent 5a83c02 commit 81d0308

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletRequestImpl.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,11 @@ public SipServletResponse createResponse(final int statusCode, final String reas
346346
final Dialog dialog = transaction.getDialog();
347347
if(session != null && dialog != null && dialog.getLocalTag() != null && dialog.getLocalTag().length() > 0
348348
&& session.getKey().getToTag() != null && session.getKey().getToTag().length() >0) {
349-
if(!dialog.getLocalTag().equals(session.getKey().getToTag())) {
349+
if(session.getB2buaHelper() == null &&
350+
!dialog.getLocalTag().equals(session.getKey().getToTag())) {
350351
// Issue 2354 : if the dialog to tag is different than the session to tag use the session to tag
351352
// so that we send the forked response out with the correct to tag
353+
//Added B2BUA condition becuase this actually makes the forking cases to fail
352354
if(logger.isDebugEnabled()) {
353355
logger.debug("setting session ToTag: " + session.getKey().getToTag());
354356
}

0 commit comments

Comments
 (0)