if (s == null) {
// check if we are spiraling: look up early dialog
String id = DialogSet.createKey(req.getCallId(),
req.getFromImpl().getParameter(AddressImpl.TAG_PARAM));
DialogSet existingDs = DialogSet.getEarlyDialog(id);
if (existingDs != null) {
// spiraling indeed!
req.setDialog(existingDs.createAdditionalDialogFragment());
} else {
// not spiraling
// creates a new sip session and dialog structure
DialogSet ds = new DialogSet(req.getMethod(), req.getCallId(), req.getFromImpl(),
req.getBeKey(), SipFactoryImpl.isDialogCreational(req.getMethod()));
req.setDialog(ds.getInitialDialogFragment());
DialogSet.registerEarlyDialog(req);
}
}
// creates a new sip session