Revision: 22732
Author: [email protected]
Date: Mon Jun 18 20:39:20 2012
Log: Fixes Issue 3212
http://code.google.com/p/mobicents/source/detail?r=22732
Modified:
/branches/jbcp/5.1.x/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/proxy/ProxyBranchImpl.java
/branches/jbcp/5.1.x/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/proxy/ProxyImpl.java
=======================================
---
/branches/jbcp/5.1.x/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/proxy/ProxyBranchImpl.java
Mon Jun 18 20:37:19 2012
+++
/branches/jbcp/5.1.x/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/proxy/ProxyBranchImpl.java
Mon Jun 18 20:39:20 2012
@@ -741,7 +741,7 @@
// Determine the direction of the request. Either it's from the dialog
initiator (the caller)
// or from the callee
-
if(!request.getFrom().toString().equals(proxy.getCallerFromHeader())) {
+
if(!((MessageExt)request.getMessage()).getFromHeader().getTag().toString().equals(proxy.getCallerFromTag()))
{
// If it's from the callee we should send it in the
other direction
targetURI = proxy.getPreviousNode();
}
=======================================
---
/branches/jbcp/5.1.x/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/proxy/ProxyImpl.java
Tue Sep 13 07:31:03 2011
+++
/branches/jbcp/5.1.x/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/proxy/ProxyImpl.java
Mon Jun 18 20:39:20 2012
@@ -119,9 +119,9 @@
// Keep the URI of the previous SIP entity that sent the original request
to us (either another proxy or UA)
private SipURI previousNode;
- // The From-header of the initiator of the request. Used to determine the
direction of the request.
+ // The From-header tag of the initiator of the request. Used to determine
the direction of the request.
// Caller -> Callee or Caller <- Callee
- private String callerFromHeader;
+ private String callerFromTag;
// Issue 1791 : using a timer service created outside the application
loader to avoid leaks on startup/shutdown
private transient ProxyTimerService proxyTimerService;
@@ -149,7 +149,7 @@
throw new IllegalArgumentException("couldn't parse the outbound
interface " + outboundInterface, e);
}
}
- this.callerFromHeader = request.getFrom().toString();
+ this.callerFromTag =
((MessageExt)request.getMessage()).getFromHeader().getTag();
this.previousNode = extractPreviousNodeFromRequest(request);
this.callerCSeq =
((MessageExt)request.getMessage()).getCSeqHeader().getSeqNumber();
String txid = ((ViaHeader)
request.getMessage().getHeader(ViaHeader.NAME)).getBranch();
@@ -800,7 +800,7 @@
public void setOriginalRequest(SipServletRequestImpl originalRequest) {
// Determine the direction of the request. Either it's from the dialog
initiator (the caller)
// or from the callee
-
if(originalRequest.getFrom().toString().equals(callerFromHeader)) {
+
if(((MessageExt)originalRequest.getMessage()).getFromHeader().getTag().equals(callerFromTag))
{
callerCSeq =
(((MessageExt)originalRequest.getMessage()).getCSeqHeader().getSeqNumber());
} else {
// If it's from the callee we should send it in the
other direction
@@ -921,12 +921,12 @@
return previousNode;
}
- public String getCallerFromHeader() {
- return callerFromHeader;
+ public String getCallerFromTag() {
+ return callerFromTag;
}
- public void setCallerFromHeader(String initiatorFromHeader) {
- this.callerFromHeader = initiatorFromHeader;
+ public void setCallerFromTag(String initiatorFromTag) {
+ this.callerFromTag = initiatorFromTag;
}
public HashMap<String, TransactionApplicationData> getTransactionMap() {
@@ -957,7 +957,7 @@
finalBranchForSubsequentRequests.setProxy(this);
}
previousNode = (SipURI) in.readObject();
- callerFromHeader = in.readUTF();
+ callerFromTag = in.readUTF();
calleeCSeq = in.readLong();
callerCSeq = in.readLong();
this.proxyBranches = new LinkedHashMap<URI, ProxyBranchImpl> ();
@@ -986,7 +986,7 @@
out.writeBoolean(tryingSent);
out.writeObject(finalBranchForSubsequentRequests);
out.writeObject(previousNode);
- out.writeUTF(callerFromHeader);
+ out.writeUTF(callerFromTag);
out.writeLong(calleeCSeq);
out.writeLong(callerCSeq);
out.writeBoolean(storeTerminationInfo);