*/
public SipRequest getGenericRequest(String requestUri, String method,
String profileUri) throws SipUriSyntaxException {
//8.1.1
SipRequest request = new SipRequest(method, new SipURI(requestUri));
SipHeaders headers = request.getSipHeaders();
//String hostAddress = utils.getMyAddress().getHostAddress();
//Via
//TODO no Via should be added directly by UAC, Via is normally added by Transaction layer
// StringBuffer viaBuf = new StringBuffer();
// viaBuf.append(RFC3261.DEFAULT_SIP_VERSION);
// // TODO choose real transport
// viaBuf.append("/UDP ");
// viaBuf.append(hostAddress);
// SipHeaderFieldValue via = new SipHeaderFieldValue(viaBuf.toString());
// via.addParam(new SipHeaderParamName(RFC3261.PARAM_BRANCHID),
// utils.generateBranchId());
// headers.add(new SipHeaderFieldName(RFC3261.HDR_VIA), via);
Utils.addCommonHeaders(headers);
//To
NameAddress to = new NameAddress(requestUri);
headers.add(new SipHeaderFieldName(RFC3261.HDR_TO),
new SipHeaderFieldValue(to.toString()));
//From
NameAddress fromNA = new NameAddress(profileUri);
SipHeaderFieldValue from = new SipHeaderFieldValue(fromNA.toString());
from.addParam(new SipHeaderParamName(RFC3261.PARAM_TAG),
Utils.generateTag());
headers.add(new SipHeaderFieldName(RFC3261.HDR_FROM), from);
//Call-ID
headers.add(new SipHeaderFieldName(RFC3261.HDR_CALLID),
new SipHeaderFieldValue(Utils.generateCallID(
userAgent.getConfig().getLocalInetAddress())));
//CSeq
headers.add(new SipHeaderFieldName(RFC3261.HDR_CSEQ),
new SipHeaderFieldValue(userAgent.generateCSeq(method)));
return request;
}