StringMsgParser smp = new StringMsgParser();
SIPResponse sipResponse = new SIPResponse(); StatusLine statusLine = new StatusLine(); statusLine.setStatusCode(statusCode); String reasonPhrase = SIPResponse.getReasonPhrase(statusCode); if (reasonPhrase == null) throw new ParseException(statusCode + " Unkown  ", 0); statusLine.setReasonPhrase(reasonPhrase); sipResponse.setStatusLine(statusLine); sipResponse.setCallId(callId); sipResponse.setCSeq(cSeq); sipResponse.setFrom(from); sipResponse.setTo(to); sipResponse.setVia(via); sipResponse.setMaxForwards(maxForwards); sipResponse.setContent(content, contentType);
	public Response createResponse (String responseString ) 	throws java.text.ParseException {	    if (responseString == null)			return new SIPResponse();		StringMsgParser smp = new StringMsgParser();		SIPMessage sipMessage = smp.parseSIPMessage(responseString);		if (!(sipMessage instanceof SIPResponse))			throw new ParseException(responseString, 0);		return (SIPResponse) sipMessage;	}