亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? messageprocessor.java

?? 是一個用java實現的
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
	 * Process the OK received response for a BYE
	 * @param clientTransaction - the client transaction associated with the response
	 * @param byeOK - the OK received response for a BYE
	 */
	public void processByeOK(
		ClientTransaction clientTransaction,
		Response byeOK) {
		CallManager callManager =
			messageListener.sipMeetingManager.getCallManager();
		//Find the Audio call
		Call call =
			callManager.findCall(clientTransaction.getDialog().getDialogId());
		if (call instanceof AudioCall) {
			AudioCall audioCall = (AudioCall) call;
			audioCall.setStatus(AudioCall.NOT_IN_A_CALL);
			messageListener.sipMeetingManager.notifyObserversNewCallStatus(
				audioCall);
			/*if(audioCall.getVoiceMessaging()){
				stopVoiceMessagingSchedule();		
			}					
			else{
				audioCall.getMediaManager().stopMediaSession();
			}*/
			System.out.println(
				"Audio Call removed : " + call.getDialog().getDialogId());
			//Remove the call
			callManager.removeAudioCall(audioCall);
		} else {
			IMCall imCall = (IMCall) call;
			//Remove the call
			System.out.println(
				"IM Call removed : " + call.getDialog().getDialogId());
			callManager.removeIMCall(imCall);
		}
	}

	/**
	 * Process the OK received response for a CANCEL
	 * @param clientTransaction - the client transaction associated with the response
	 * @param cancelOK - the OK received response for a CANCEL
	 */
	public void processCancelOK(
		ClientTransaction clientTransaction,
		Response cancelOK) {
		CallManager callManager =
			messageListener.sipMeetingManager.getCallManager();
		//Strip out the callee
		SipURI calleeURI =
			(SipURI) ((ToHeader) cancelOK.getHeader(ToHeader.NAME))
				.getAddress()
				.getURI();
		String callee =
			"sip:"
				+ calleeURI.getUser()
				+ "@"
				+ calleeURI.getHost().trim().toLowerCase();
		//Find the Audio call
		AudioCall call = callManager.findAudioCall(callee);
		call.setStatus(AudioCall.NOT_IN_A_CALL);
		messageListener.sipMeetingManager.notifyObserversNewCallStatus(call);
		callManager.removeAudioCall(call);
	}

	/**
	 * Process the OK received response for a MESSAGE
	 * @param clientTransaction - the client transaction associated with the response
	 * @param cancelOK - the OK received response for a MESSAGE
	 */
	public void processMessageOK(
		ClientTransaction clientTransaction,
		Response messageOK) {

	}

	/**
	 * Process the OK received response for a SUBSCRIBE
	 * @param clientTransaction - the client transaction associated with the response
	 * @param cancelOK - the OK received response for a MESSAGE
	 */
	public void processSubscribeOK(
		ClientTransaction clientTransaction,
		Response subscribeOK) {
		messageListener.sipMeetingManager.presenceAllowed = true;
		Address address =
			((FromHeader) subscribeOK.getHeader(FromHeader.NAME)).getAddress();
		String sender = null;
		if (address.getURI().isSipURI()) {
			SipURI sipURI = ((SipURI) address.getURI());
			String host = sipURI.getHost();
			String user = sipURI.getUser();
			sender = user + "@" + host;
		}
		/*Subscriber subscriber = new Subscriber(sender);
		subscriber.setDialog(clientTransaction.getDialog());
		messageListener.sipMeetingManager.getPresentityManager().
			sendNotifyToSubscriber(
									subscriber,
									"open",
									"online");*/
	}

	/**
	 * Process the OK received response for a SUBSCRIBE
	 * @param clientTransaction - the client transaction associated with the response
	 * @param cancelOK - the OK received response for a MESSAGE
	 */
	public void processSubscribeAccepted(
		ClientTransaction clientTransaction,
		Response subscribeAccepted) {
		messageListener.sipMeetingManager.presenceAllowed = true;
		/*Address address=((FromHeader)subscribeOK.getHeader(FromHeader.NAME)).getAddress();
		String sender=null;
		if(address.getURI().isSipURI()){
			SipURI sipURI=((SipURI)address.getURI());
			String host=sipURI.getHost();
			String user=sipURI.getUser();
			sender=user+"@"+host;
		}*/
		/*Subscriber subscriber = new Subscriber(sender);
		subscriber.setDialog(clientTransaction.getDialog());
		messageListener.sipMeetingManager.getPresentityManager().
			sendNotifyToSubscriber(
									subscriber,
									"open",
									"online");*/
	}

	/**
	 * Process the OK received response for a INVITE
	 * @param clientTransaction - the client transaction associated with the response
	 * @param inviteOK - the OK received response for a INVITE
	 */
	public void processInviteOK(
		ClientTransaction clientTransaction,
		Response inviteOK) {
		CallManager callManager =
			messageListener.sipMeetingManager.getCallManager();
		//Strip out the callee
		SipURI calleeURI =
			(SipURI) ((ToHeader) inviteOK.getHeader(ToHeader.NAME))
				.getAddress()
				.getURI();
		String callee =
			"sip:" + calleeURI.getUser() + "@" + calleeURI.getHost();
		//Find the Audio call
		AudioCall call = callManager.findAudioCall(callee);
		//Send ACK
		try {
			Request ack =
				(Request) clientTransaction.getDialog().createRequest(
					Request.ACK);
			//ack.setRequestURI(calleeURI);
			System.out.println("Sending ACK : \n" + ack.toString());
			try {
				clientTransaction.getDialog().sendAck(ack);
			} catch (SipException ex) {
				System.out.println("Could not send out the ACK request! ");
				ex.printStackTrace();
			}
			//messageListener.sipProvider.sendRequest(ack);                        
		} catch (SipException ex) {
			ex.printStackTrace();
		}
		ContentTypeHeader contentTypeHeader =
			(ContentTypeHeader) inviteOK.getHeader(ContentTypeHeader.NAME);
		// no content type header means other end does not support sdp.
		if (contentTypeHeader != null) {
			String type = contentTypeHeader.getContentType();
			String subType = contentTypeHeader.getContentSubType();
			//System.out.println("the other end answer us with "+subType);				        	
			messageListener.sipMeetingManager.notifyObserversNewCallStatus(
				call);
			if (type.equals("application") && subType.equals("sdp")) {
				//Start the media session
				MediaManager mediaManager = call.getMediaManager();
				call.setVoiceMesaging(false);
				mediaManager.prepareMediaSession(
					new String(inviteOK.getRawContent()));
				mediaManager.startMediaSession(true);
			}
		} else {
			// else start the media messaging session.
			ListIterator it = inviteOK.getHeaders(AcceptHeader.NAME);
			while (it.hasNext()) {
				AcceptHeader next = (AcceptHeader) it.next();
				if (next.getContentType().equals("audio")
					&& (next.getContentSubType().equals("gsm")
						|| next.getContentSubType().equals("x-gsm"))) {
					call.setVoiceMesaging(true);
					//schedule to send the voice messages every 2 sec.
					startVoiceMessagingSchedule(callee);
				} else if (
					next.getContentType().equals("text")
						&& next.getContentSubType().equals("plain")) {
					// TODO -- textMessaging.setTextMessaging(true);
				}
			}
		}
		call.setStatus(AudioCall.IN_A_CALL);
		messageListener.sipMeetingManager.notifyObserversNewCallStatus(call);
	}

	/**
	 * Process the Busy here response
	 * @param clientTransaction - the client transaction associated with the response
	 * @param busyhere - the Busy here response
	 */
	public void processBusyHere(
		ClientTransaction clientTransaction,
		Response busyHere) {
		CallManager callManager =
			messageListener.sipMeetingManager.getCallManager();
		//Strip out the callee
		SipURI calleeURI =
			(SipURI) ((ToHeader) busyHere.getHeader(ToHeader.NAME))
				.getAddress()
				.getURI();
		String callee =
			"sip:" + calleeURI.getUser() + "@" + calleeURI.getHost();		
		Call call =
			callManager.findCall(clientTransaction.getDialog().getDialogId());
		if (call instanceof AudioCall) {
			//Strip out the Call info Header
			CallInfoHeader callInfoHeader=(CallInfoHeader)busyHere.getHeader(CallInfoHeader.NAME);
			URI uri=callInfoHeader.getInfo();
			((AudioCall)call).setURL(uri);
			call.setStatus(AudioCall.BUSY);			
			messageListener.sipMeetingManager.notifyObserversNewCallStatus(
				call);
			System.out.println(
				"Audio Call removed : " + call.getDialog().getDialogId());
			callManager.removeAudioCall((AudioCall) call);
		}
	}

	/**
	 * Process the temporary Unavailable response
	 * @param clientTransaction - the client transaction associated with the response
	 * @param temporaryUnavailable - the temporary Unavailable response
	 */
	public void processUnavailable(
		ClientTransaction clientTransaction,
		Response temporaryUnavailable) {
		CallManager callManager =
			messageListener.sipMeetingManager.getCallManager();
		//Find the call		
		Call call =
			callManager.findCall(clientTransaction.getDialog().getDialogId());
		if (call instanceof AudioCall) {
			AudioCall audioCall = (AudioCall) call;
			audioCall.setStatus(Call.TEMPORARY_UNAVAILABLE);
			messageListener.sipMeetingManager.notifyObserversNewCallStatus(
				audioCall);
			System.out.println(
				"Audio Call removed : " + call.getDialog().getDialogId());
			callManager.removeAudioCall(audioCall);
		} else if (call instanceof IMCall) {
			IMCall imCall = (IMCall) call;
			imCall.setStatus(Call.TEMPORARY_UNAVAILABLE);
			messageListener.sipMeetingManager.notifyObserversNewCallStatus(
				imCall);
			System.out.println(
				"IM Call removed : " + call.getDialog().getDialogId());
			callManager.removeIMCall(imCall);
		}
	}


	/**
	 * Process the 407 - Proxy Authentication Required
	 * @param clientTransaction - the client transaction associated with the response
	 * @param proxyAuthenticationRequired - the temporary Unavailable response
	 */
	public void processProxyAuthenticationRequired(
		ClientTransaction clientTransaction,
		Response proxyAuthenticationRequired) {
		messageListener.sipMeetingManager.setRegisterStatus(
			RegisterStatus.PROXY_AUTHENTICATION_REQUIRED);
	}

	/**
	 * Process the 405 - Method Not Allowed
	 * @param clientTransaction - the client transaction associated with the response
	 * @param proxyAuthenticationRequired - the temporary Unavailable response
	 */
	public void processMethodNotAllowed(
		ClientTransaction clientTransaction,
		Response methodNotAllowed) {
		messageListener.sipMeetingManager.presenceAllowed = false;
	}

	/**********************************************************************/
	/*                                                                    */
	/*                    Handling timeout messages                       */
	/*                                                                    */
	/**********************************************************************/

	/**
	 * Process the timed out MESSAGE
	 * @param message - the timedout request 
	 */
	public void processTimedOutMessage(Request message) {
		ToHeader toHeader = (ToHeader) (message.getHeader(ToHeader.NAME));
		Address address = toHeader.getAddress();
		if (address.getURI().isSipURI()) {
			SipURI toURI = (SipURI) address.getURI();
			messageListener.sipMeetingManager.notifyObserversIMReceived(
				new String(message.getRawContent())
					+ " has not been delivered successfully",
				toURI.getUser() + "@" + toURI.getHost());
		}
		SipURI toUri = ((SipURI)((ToHeader) message.getHeader(ToHeader.NAME)).getAddress().getURI());
                String id = toUri.getUser() + "@" + toUri.getHost();
                this.callManager.removeIMCall(id);
                
	}

	/**
	 * Process the timed out REGISTER
	 * @param message - the timedout request 
	 */
	public void processTimedOutRegister(Request register) {
		messageListener.sipMeetingManager.setRegisterStatus(
			RegisterStatus.NOT_REGISTERED);
	}

	/**
	 * Process the timed out REGISTER
	 * @param message - the timedout request 
	 */
	public void processTimedOutInvite(Request invite) {
		messageListener.sipMeetingManager.setRegisterStatus(
			AudioCall.NOT_IN_A_CALL);
	}

	/**
	 * Process the Timeout received request
	 * @param transaction - the transaction associated with the request
	 * @param timeout - the timeout request
	 */
	public void processTimeout(Transaction transaction, Request timeout) {

	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99国产精品国产精品久久| 欧美在线观看一二区| 91亚洲精品一区二区乱码| 欧美日韩一级二级| 国产精品久久久久久一区二区三区 | 亚洲r级在线视频| 国产一区二区调教| 欧美亚洲综合一区| 最新国产成人在线观看| 精品一二三四在线| 欧美性大战xxxxx久久久| 国产精品福利一区| 国产黄色精品视频| 精品动漫一区二区三区在线观看 | 国产欧美视频一区二区三区| 亚洲成人综合网站| 色综合久久久久综合| 国产精品免费视频网站| 久久99国产精品久久99果冻传媒| 欧美综合在线视频| 一区二区在线观看视频在线观看| 成人激情黄色小说| 国产色一区二区| 国产精品一级黄| 337p日本欧洲亚洲大胆精品| 欧美aⅴ一区二区三区视频| 欧美午夜理伦三级在线观看| 椎名由奈av一区二区三区| 成人性生交大片| 国产精品卡一卡二| 99精品热视频| 亚洲免费观看高清| 色婷婷精品久久二区二区蜜臂av| 亚洲欧美日韩人成在线播放| 不卡一区中文字幕| 国产精品国产三级国产普通话99| 成熟亚洲日本毛茸茸凸凹| 欧美激情一区二区三区| 粉嫩av一区二区三区粉嫩| 国产精品视频在线看| 97se亚洲国产综合自在线不卡| 国产精品污www在线观看| hitomi一区二区三区精品| 国产精品久久久久7777按摩| 91在线观看地址| 午夜一区二区三区视频| 日韩视频中午一区| 国产一区二三区好的| 国产精品久久久久久久久动漫| 91在线观看美女| 日日夜夜免费精品| 久久久亚洲国产美女国产盗摄| 成人国产视频在线观看| 伊人开心综合网| 3d成人动漫网站| 国产成人精品免费| 亚洲精品成人精品456| 欧美一区二区视频网站| 国产呦精品一区二区三区网站| 国产欧美日韩精品在线| 欧美日韩在线播放三区四区| 麻豆91小视频| 亚洲视频免费看| 日韩精品影音先锋| 成人精品电影在线观看| 亚洲电影视频在线| 久久麻豆一区二区| 在线免费观看视频一区| 九九**精品视频免费播放| ...中文天堂在线一区| 欧美人伦禁忌dvd放荡欲情| 狠狠色丁香婷综合久久| 伊人性伊人情综合网| 精品国产乱码久久久久久久久 | 6080yy午夜一二三区久久| 国产精品原创巨作av| 亚洲主播在线观看| 国产欧美一区二区三区鸳鸯浴| 欧美日韩在线播放| av色综合久久天堂av综合| 日韩精品欧美成人高清一区二区| 中文字幕在线不卡一区二区三区| 欧美一区二区国产| 色综合久久久网| 福利一区在线观看| 麻豆成人久久精品二区三区红| 亚洲一区视频在线观看视频| 2024国产精品| 欧美一区二区三区不卡| 91天堂素人约啪| 国产二区国产一区在线观看| 日韩激情视频网站| 一卡二卡三卡日韩欧美| 亚洲欧洲国产专区| 久久婷婷色综合| 91精品国产91久久久久久一区二区| 成人av中文字幕| 国产高清久久久久| 久久国产尿小便嘘嘘尿| 五月激情综合网| 亚洲成人一二三| 亚洲愉拍自拍另类高清精品| 中文字幕一区在线观看视频| 久久一区二区三区四区| 91精品国产91久久综合桃花| 欧美日本不卡视频| 欧美精品欧美精品系列| 欧美日韩一区在线观看| 91久久精品一区二区三| 欧美专区日韩专区| 欧美性受xxxx| 91国内精品野花午夜精品| 91论坛在线播放| 色偷偷成人一区二区三区91| 色综合天天综合狠狠| 91色乱码一区二区三区| 99久久精品99国产精品 | 91精品国产综合久久久久久久久久 | 制服.丝袜.亚洲.另类.中文| 欧美日韩在线不卡| 欧美日韩国产a| 3atv一区二区三区| 日韩精品一区二区三区蜜臀 | 国产另类ts人妖一区二区| 精品一区二区三区在线播放视频 | 久久日一线二线三线suv| 精品国产区一区| 久久精品亚洲乱码伦伦中文 | heyzo一本久久综合| 一本一道波多野结衣一区二区| 91在线观看高清| 777亚洲妇女| 精品国产乱码久久久久久蜜臀| 国产日韩欧美精品综合| 亚洲人成精品久久久久| 午夜私人影院久久久久| 国精品**一区二区三区在线蜜桃| 成人免费视频一区二区| 欧美中文字幕一区二区三区亚洲| 欧美一区二视频| 中文字幕精品—区二区四季| 亚洲精品中文在线观看| 美国欧美日韩国产在线播放| 成人精品视频一区二区三区尤物| 一本一道久久a久久精品综合蜜臀| 538在线一区二区精品国产| 久久综合资源网| 自拍视频在线观看一区二区| 午夜私人影院久久久久| 粉嫩av一区二区三区在线播放| 欧美在线观看禁18| 精品理论电影在线观看| 一区二区三区中文在线观看| 日本aⅴ免费视频一区二区三区| 国v精品久久久网| 91精品国产综合久久久蜜臀粉嫩 | 99久久精品免费看国产免费软件| 欧美日韩成人激情| 欧美韩国日本不卡| 奇米色一区二区| 99re66热这里只有精品3直播 | 亚洲激情六月丁香| 韩国女主播一区| 欧美日高清视频| 中文字幕制服丝袜成人av| 免费看日韩精品| 色婷婷综合五月| 欧美国产激情二区三区| 美女在线观看视频一区二区| 在线亚洲欧美专区二区| 日本一区二区免费在线观看视频 | 制服丝袜在线91| 亚洲欧美另类图片小说| 国产一区二区三区在线观看精品| 欧美偷拍一区二区| 一区二区在线观看视频| 成人自拍视频在线| 亚洲精品一区二区三区影院 | 日韩欧美在线一区二区三区| 亚洲女同一区二区| 成人av电影观看| 国产三级精品视频| 黄一区二区三区| 日韩欧美国产精品| 男人操女人的视频在线观看欧美| 欧美日韩视频在线观看一区二区三区| 国产精品久久精品日日| 国产.欧美.日韩| 国产日韩三级在线| 国产一区二区在线电影| 精品国产三级a在线观看| 久久精品99国产国产精| 日韩欧美一级二级三级久久久| 亚洲成人高清在线| 欧美日韩另类一区| 亚洲成av人片观看| 在线不卡免费欧美| 麻豆一区二区三区| 日韩欧美国产一区在线观看| 久久se这里有精品|