Session oldCalleeSession = sa.getSession(oldCallId);
oldCalleeSession.setCallId(calleeCallIdNew);
try {
ActivityContextInterface sipACI = activityContextInterfaceFactory
.getActivityContextInterface(dialog);
sipACI.attach(sbbLocalObject);
sipACI.attach(this.getParentCmp());
} catch (UnrecognizedActivityException aci) {
aci.printStackTrace();
}
cache.put(calleeCallIdNew, sa);
}
final String callId = dialog.getCallId().getCallId();
if (log.isDebugEnabled()) {
log
.debug("Obtained dialog from ClientTransaction in sendRequestWithAuthorizationHeader "
+ " : dialog callId = " + callId);
}
// Store the client transaction in the cache
// since we may need to send a cancel request associated with this
// ClientTransaction later.
setToBeCancelledClientTransaction(ct);
// Store the dialog in the cache with the associated call id of the new
// transaction.
setDialog(dialog, callId);
// Since we are about the send the request in a new client transaction,
// we need to
// attach it to the new activity context in order to receive the
// following events.
// We start this by getting the activity context
ActivityContextInterface ac = null;
try {
ac = activityContextInterfaceFactory
.getActivityContextInterface(ct);
} catch (FactoryException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NullPointerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (UnrecognizedActivityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// Attach our local interface to the new ActivityContextInterface
// This makes this Sbb receive responses to the request
ac.attach(sbbLocalObject);
// Finally, send the request!
try {
ct.sendRequest();
} catch (SipException e) {