dialog = inviteTid.getDialog();
this.dialog = inviteTid.getDialog();
	public void sendInvite() {		try {			/**			 * either use udp or tcp			 */			String fromName = "BigGuy";			String fromSipAddress = "here.com";			String fromDisplayName = "The Master Blaster";			String toSipAddress = "there.com";			String toUser = "LittleGuy";			String toDisplayName = "The Little Blister";			// create >From Header			SipURI fromAddress = protocolObjects.addressFactory.createSipURI(					fromName, fromSipAddress);			Address fromNameAddress = protocolObjects.addressFactory					.createAddress(fromAddress);			fromNameAddress.setDisplayName(fromDisplayName);			FromHeader fromHeader = protocolObjects.headerFactory					.createFromHeader(fromNameAddress, "12345");			// create To Header			SipURI toAddress = protocolObjects.addressFactory.createSipURI(					toUser, toSipAddress);			Address toNameAddress = protocolObjects.addressFactory					.createAddress(toAddress);			toNameAddress.setDisplayName(toDisplayName);			ToHeader toHeader = protocolObjects.headerFactory.createToHeader(					toNameAddress, null);			// create Request URI			this.requestURI = protocolObjects.addressFactory.createSipURI(					toUser, peerHostPort);			// Create ViaHeaders			ArrayList viaHeaders = new ArrayList();			ViaHeader viaHeader = protocolObjects.headerFactory					.createViaHeader("127.0.0.1", sipProvider							.getListeningPoint(protocolObjects.transport).getPort(), protocolObjects.transport,							null);			// add via headers			viaHeaders.add(viaHeader);			// Create ContentTypeHeader			ContentTypeHeader contentTypeHeader = protocolObjects.headerFactory					.createContentTypeHeader("application", "sdp");			// Create a new CallId header			CallIdHeader callIdHeader = sipProvider.getNewCallId();			// JvB: Make sure that the implementation matches the messagefactory			callIdHeader = protocolObjects.headerFactory.createCallIdHeader( callIdHeader.getCallId() );			// Create a new Cseq header			CSeqHeader cSeqHeader = protocolObjects.headerFactory					.createCSeqHeader(1, Request.INVITE);			// Create a new MaxForwardsHeader			MaxForwardsHeader maxForwards = protocolObjects.headerFactory					.createMaxForwardsHeader(70);			// Create the request.			Request request = protocolObjects.messageFactory.createRequest(					requestURI, Request.INVITE, callIdHeader, cSeqHeader,					fromHeader, toHeader, viaHeaders, maxForwards);			// Create contact headers			String host = "127.0.0.1";			SipURI contactUrl = protocolObjects.addressFactory.createSipURI(					fromName, host);			/**			 * either use tcp or udp			 */			contactUrl.setPort(listeningPoint.getPort());			contactUrl.setTransportParam(protocolObjects.transport);					// Create the contact name address.						Address contactAddress = protocolObjects.addressFactory					.createAddress(contactUrl);			contactUrl.setLrParam();			// Add the contact address.			contactAddress.setDisplayName(fromName);			contactHeader = protocolObjects.headerFactory					.createContactHeader(contactAddress);			request.addHeader(contactHeader);						SipURI uri = protocolObjects.addressFactory.createSipURI(null, "127.0.0.1");						uri.setLrParam();			uri.setTransportParam(protocolObjects.transport);			uri.setPort(this.peerPort);						Address address = protocolObjects.addressFactory.createAddress(uri);			RouteHeader routeHeader = protocolObjects.headerFactory.createRouteHeader(address);			request.addHeader(routeHeader);			Header callInfoHeader = protocolObjects.headerFactory.createHeader(					"Call-Info", "<http://www.antd.nist.gov>");			request.addHeader(callInfoHeader);			// Create the client transaction.			inviteTid = sipProvider.getNewClientTransaction(request);			// send the request out.			inviteTid.sendRequest();			this.transactionCount ++;						assertTrue(inviteTid.getState() == TransactionState.CALLING);						logger.info("client tx = " + inviteTid);			dialog = inviteTid.getDialog();			this.dialogCount++;			assertTrue(dialog != null);			assertTrue(dialog.getState() == null);		} catch (Exception ex) {			logger.error(ex.getMessage(),ex);			fail("unexpected exception");		}	}