from.removeParameter("tag");
Address address = addressFactory.createAddress("Shootme <sip:"
+ myAddress + ":" + myPort + ">");
ContactHeader contactHeader = headerFactory
.createContactHeader(address);
ToHeader toHeader = (ToHeader) okResponse.getHeader(ToHeader.NAME);
toHeader.setTag("4321"); // Application is supposed to set.
FromHeader fromHeader = (FromHeader)okResponse.getHeader(FromHeader.NAME);
fromHeader.setTag("12345");
okResponse.addHeader(contactHeader);
serverTransaction.sendResponse(okResponse);
} catch (Exception ex) {
ex.printStackTrace();
//System.exit(0);
}
if(q%100==0) System.out.println("Send " + q);
}
try {
Response okResponse = messageFactory.createResponse(200,
request);
FromHeader from = (FromHeader) okResponse.getHeader(FromHeader.NAME);
from.removeParameter("tag");
Address address = addressFactory.createAddress("Shootme <sip:"
+ myAddress + ":" + myPort + ">");
ContactHeader contactHeader = headerFactory
.createContactHeader(address);
ToHeader toHeader = (ToHeader) okResponse.getHeader(ToHeader.NAME);
toHeader.setTag("4321"); // Application is supposed to set.
FromHeader fromHeader = (FromHeader)okResponse.getHeader(FromHeader.NAME);
fromHeader.setTag("12345");
okResponse.addHeader(contactHeader);
serverTransaction.sendResponse(okResponse);