if (server_profile.on_route && msg.isInvite() && !is_on_route)
{ SipURL rr_url;
if (sip_provider.getPort()==SipStack.default_port) rr_url=new SipURL(sip_provider.getViaAddress());
else rr_url=new SipURL(sip_provider.getViaAddress(),sip_provider.getPort());
if (server_profile.loose_route) rr_url.addLr();
RecordRouteHeader rrh=new RecordRouteHeader(new NameAddress(rr_url));
msg.addRecordRouteHeader(rrh);
}
// which protocol?
String proto=null;
if (msg.hasRouteHeader())