return request;
}
protected void setDialogHeaders(SipRequest request, long cseq)
{
SipFields fields = request.getFields();
fields.setAddress(SipHeaders.FROM_BUFFER, _localParty);
fields.setAddress(SipHeaders.TO_BUFFER, _remoteParty);
if (_remoteTarget != null)
request.setRequestURI((URI) _remoteTarget.clone());
else if (request.getRequestURI() == null)
request.setRequestURI(request.to().getURI());
if (_routeSet != null)
{
fields.remove(SipHeaders.ROUTE_BUFFER);
for (String route: _routeSet)
{
fields.addString(SipHeaders.ROUTE_BUFFER, route);
}
}
fields.setString(SipHeaders.CALL_ID_BUFFER, _callId);
fields.setString(SipHeaders.CSEQ_BUFFER, cseq + " " + request.getMethod());
fields.setString(SipHeaders.MAX_FORWARDS_BUFFER, "70");
if (request.needsContact())
fields.setAddress(SipHeaders.CONTACT_BUFFER, getContact());
}