Request request = requestEvent.getRequest();
ViaHeader viaHeader = headerFactory.createViaHeader(
this.myHost, this.myPort, ListeningPoint.UDP, "z9hG4bK"+Math.random()*31+""+System.currentTimeMillis());
//Decreasing the Max Forward Header
MaxForwardsHeader maxForwardsHeader = (MaxForwardsHeader) request.getHeader(MaxForwardsHeader.NAME);
if (maxForwardsHeader == null) {
maxForwardsHeader = headerFactory.createMaxForwardsHeader(70);
request.addHeader(maxForwardsHeader);
} else {
maxForwardsHeader.setMaxForwards(maxForwardsHeader.getMaxForwards() - 1);
}
// Add the via header to the top of the header list.
request.addHeader(viaHeader);
//Removing first routeHeader if it is for us
RouteHeader routeHeader = (RouteHeader) request.getHeader(RouteHeader.NAME);