else maxfwd=new MaxForwardsHeader(SipStack.max_forwards);
msg.setMaxForwardsHeader(maxfwd);
// domain name routing
if (server_profile.domain_routing_rules!=null && server_profile.domain_routing_rules.length>0)
{ RequestLine rl=msg.getRequestLine();
SipURL request_uri=rl.getAddress();
for (int i=0; i<server_profile.domain_routing_rules.length; i++)
{ RoutingRule rule=(RoutingRule)server_profile.domain_routing_rules[i];
SipURL nexthop=rule.getNexthop(request_uri);
if (nexthop!=null)
{ printLog("domain-based routing: "+rule.toString()+": YES",LogLevel.MEDIUM);
printLog("target="+nexthop.toString(),LogLevel.MEDIUM);
rl=new RequestLine(rl.getMethod(),nexthop);
msg.setRequestLine(rl);
break;
}
else printLog("prefix-based routing: "+rule.toString()+": NO",LogLevel.MEDIUM);
}