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

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

?? messengermanager.java

?? It is Java for SIP phone
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
            "text",            "plain;charset=UTF-8");        } catch (ParseException ex) {            //Shouldn't happen            System.out.println(            "Failed to create a content type header for the MESSAGE request "            + ex);        }        try {            messageRequest.setContent(message, contentTypeHeader);        } catch (ParseException ex) {            System.out.println(            "Failed to parse sdp data while creating message request! "            + ex);        }        //Transaction        ClientTransaction messageTransaction = null;        try {            messageTransaction =            messageListener.sipProvider.getNewClientTransaction(            messageRequest);            if (dialog != null )                dialog.sendRequest(messageTransaction);            else  {                messageTransaction.sendRequest();                                IMCall imcall = new IMCall(contact);                imcall.setDialog(messageTransaction.getDialog());                callManager.addIMCall(imcall);            }                    } catch (TransactionUnavailableException ex) {            System.out.println(            "Failed to create message Transaction.\n"            + "This is most probably a network connection error. ");            ex.printStackTrace();        } catch (SipException se) {            se.printStackTrace();        }            }        /**     * Send a request for subscription     * @param subscriberAddress - the address of the contact we want to     * subscribe to     */    public void sendSubscribe(String subscriberAddress) {        //Store the callee in the call status        String calleeURI = subscriberAddress.trim();        //Request URI        SipURI contactURI = null;        try {            //Create the SIP URI for the user URI            String user = calleeURI.substring(0, calleeURI.indexOf("@"));            String host =            calleeURI.substring(            calleeURI.indexOf("@") + 1,            calleeURI.length());            contactURI =            MessageListener.addressFactory.createSipURI(user, host);        } catch (ParseException pe) {            pe.printStackTrace();        }        Request subscribe =        createRequest(Request.SUBSCRIBE, contactURI, userSipURI);        //Content        ContentTypeHeader contentTypeHeader = null;        try {            contentTypeHeader =            MessageListener.headerFactory.createContentTypeHeader(            "application",            "sdp");        } catch (ParseException ex) {            //Shouldn't happen            System.out.println(            "Failed to create a content type header for the SUBSCRIBE request "            + ex);        }        //Transaction        ClientTransaction subscribeTransaction = null;        try {            subscribeTransaction =            messageListener.sipProvider.getNewClientTransaction(subscribe);            System.out.println("send request:\n" + subscribe);            subscribeTransaction.sendRequest();            //call.setDialog(subscribeTransaction.getDialog());        } catch (TransactionUnavailableException ex) {            System.out.println(            "Failed to create subscribeTransaction.\n"            + "This is most probably a network connection error. ");            ex.printStackTrace();        } catch (SipException ex) {            System.out.println(            "An error occurred while sending subscribe request " + ex);        }    }        /**     * Send an OK in repsonse to an incoming invite     * @param sdpBody - the sdpBody to include in the response     */    private void sendOK(Object sdpBody, String caller) {        //Find the Audio call        AudioCall call = callManager.findAudioCall(caller);        //Listening Point        ListeningPoint listeningPoint =        messageListener.sipProvider.getListeningPoint();        //Get the request        Request request = call.getDialog().getFirstTransaction().getRequest();        if (!call.getDialog().isServer())            System.out.println("Problem, this is a client transaction");        //Get the server Transaction        ServerTransaction serverTransaction =        (ServerTransaction) call.getDialog().getFirstTransaction();        try {            Response ok =            (Response) MessageListener.messageFactory.createResponse(            Response.OK,            request);            //Put a tag on the To Header            ((ToHeader) ok.getHeader(ToHeader.NAME)).setTag(generateTag());            //Specify the contact Header            SipURI contactURI =            MessageListener.addressFactory.createSipURI(            userSipURI.getUser(),            messageListener.getConfiguration().contactIPAddress);            contactURI.setTransportParam(            messageListener.getConfiguration().signalingTransport);            ContactHeader contactHeader =            MessageListener.headerFactory.createContactHeader(            MessageListener.addressFactory.createAddress(contactURI));            contactURI.setPort(listeningPoint.getPort());            ok.addHeader(contactHeader);            //IF the call is voice messaging we add the Accept Headers            if (call.getVoiceMessaging()) {                AcceptHeader acceptHeader =                MessageListener.headerFactory.createAcceptHeader(                "audio",                "gsm");                ok.addHeader(acceptHeader);                acceptHeader =                MessageListener.headerFactory.createAcceptHeader(                "audio",                "x-gsm");                ok.addHeader(acceptHeader);                acceptHeader =                MessageListener.headerFactory.createAcceptHeader(                "application",                "text");                ok.addHeader(acceptHeader);                //initialize the voiceRecorder                VoiceRecorder.getInstance();            } else {                //Adding the sdp Body describing the media session                ContentTypeHeader contentTypeHeader =                (ContentTypeHeader) request.getHeader(                ContentTypeHeader.NAME);                if (contentTypeHeader != null && sdpBody != null)                    ok.setContent(sdpBody, contentTypeHeader);                else                    ok.setHeader(contentTypeHeader);            }            //Send the ok            serverTransaction.sendResponse(ok);        } catch (SipException ex) {            System.out.println("Failed to send the OK response " + ex);        } catch (ParseException ex) {            ex.printStackTrace();        }    }        /**     * Send a BUSY in response to an incoming invite     */    public void sendBusy(String caller) {        //Find the Audio call        AudioCall call = callManager.findAudioCall(caller);        //Get the request        Request request = call.getDialog().getFirstTransaction().getRequest();        if (!call.getDialog().isServer())            System.out.println("Problem, this is a client transaction");        //Get the server Transaction        ServerTransaction serverTransaction =        (ServerTransaction) call.getDialog().getFirstTransaction();        try {            Response busy =            (Response) MessageListener.messageFactory.createResponse(            Response.BUSY_HERE,            request);            //If the user has put an URL for the BUSY we add i in the CALL-Info            if(messageListener.getConfiguration().httpBusy!=null){                CallInfoHeader callInfoHeader=                MessageListener.headerFactory.createCallInfoHeader(                MessageListener.addressFactory.createURI(                messageListener.getConfiguration().httpBusy));                busy.addHeader(callInfoHeader);            }            serverTransaction.sendResponse(busy);            System.out.println(            "Audio Call removed : " + call.getDialog().getDialogId());            callManager.removeAudioCall(call);        } catch (SipException ex) {            System.out.println("Failed to send the BUSY response " + ex);        } catch (ParseException ex) {            ex.printStackTrace();        }    }        /**     * The subscriber is added now and the user is notified that a new person     * wants to be added to the contact list, if he doesn't want this person     * to be added, the subscriber is gonna be removed from the GUI     * @param subscriber - the subscirber to add     */    public void notifySubscribe(Subscriber subscriber) {        //the subscriber is added now and the user is notified that a new person        //wants to be added to the contact list, if he doesn't want this person        //to be added, the subscriber is gonna be removed from the GUI        presentityManager.addSubscriber(subscriber);        //Notify the GUI and the controller that the status has changed        setChanged();        notifyObservers(subscriber);    }        /**     * Notify the GUI and the controller that the status has changed     * @param presenceTag - presence tag containing all the presence information     */    public void notifyPresence(PresenceTag presenceTag) {        Vector atomTagList = presenceTag.getAtomTagList();        AtomTag atomTag = (AtomTag) atomTagList.firstElement();        AddressTag addressTag = atomTag.getAddressTag();        MSNSubStatusTag msnSubStatusTag = addressTag.getMSNSubStatusTag();        Subscriber subscriber =        presentityManager.getSubscriber(presenceTag.getAddress());        if (subscriber != null) {            subscriber.setStatus(msnSubStatusTag.getMSNSubStatus());        }        //Notify the GUI and the controller that the status has changed        setChanged();        notifyObservers(presenceTag);    }        /**     * Retrieve the messageListener     * @return the messageListener     */    public MessageListener getMessageListener() {        return messageListener;    }        /**     * Set the current status of the call     * @param callStatus - the current status of the call     */    public void notifyObserversNewCallStatus(Call call) {        //Notify the GUI and the controller that the status has changed        setChanged();        notifyObservers(call);    }        /**     * Retrieve the contact List     * @return the contact List     */    public Vector getContactList() {        return contactList;    }        /**     * Retrieve the call Manager     * @return the call Manager     */    public CallManager getCallManager() {        return callManager;    }        /**     * Retrieve the presentity manager     * @return the presentity manager     */    public PresentityManager getPresentityManager() {        return presentityManager;    }        /**     * Retrieve the current status of the registration     * @return the current status of the registration     */    public String getRegisterStatus() {        return this.registerStatus.getStatus();    }        /**     * Set the current status of the registration     * @param registerStatus - the current status of the registration     */    public void setRegisterStatus(String registerStatus) {        this.registerStatus.setStatus(registerStatus);        //Notify the GUI and the controller that the status has changed        setChanged();        notifyObservers(this.registerStatus);    }        /**     * Notify Observers an Instant Message has been received     * @param message - the message received     */    public void notifyObserversIMReceived(String message, String sender) {        InstantMessage im = new InstantMessage(message, sender);        setChanged();        notifyObservers(im);    }        /**     * Generate a Tag     * @return the tag generated     */    public static String generateTag() {        return new Integer((int) (Math.random() * 10000)).toString();    }        /**     * Get the current sip user URI     * @return the current sip user URI     */    public SipURI getUserURI() {        return userSipURI;    }        /**     * Set the current sip user URI     * @param userURI - the current sip user URI     */    public void setUserURI(String userURI) {        try {            //Create the SIP URI for the user URI            String user = userURI.substring(0, userURI.indexOf("@"));            String host =            userURI.substring(userURI.indexOf("@") + 1, userURI.length());            userSipURI =            MessageListener.addressFactory.createSipURI(user, host);            userSipURI.setTransportParam(            messageListener.getConfiguration().signalingTransport);        } catch (ParseException ex) {            System.out.println(userURI + " is not a legal SIP uri! " + ex);        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区二区在线观看网站 | 亚瑟在线精品视频| 国产99精品在线观看| 国产亚洲欧美一区在线观看| 激情图区综合网| 精品免费日韩av| 国产自产高清不卡| 精品99一区二区三区| 国产一区二区在线看| 青青草精品视频| 久久久久国产一区二区三区四区| 国产999精品久久久久久 | 7777精品伊人久久久大香线蕉| 丝袜美腿亚洲一区| 精品精品国产高清a毛片牛牛| 国产毛片精品一区| 亚洲一区免费在线观看| 日韩欧美久久一区| proumb性欧美在线观看| 亚洲成人av电影在线| 欧美zozo另类异族| 波多野结衣在线一区| 亚洲一区欧美一区| 国产日韩精品一区二区三区在线| 色欧美片视频在线观看| 国产做a爰片久久毛片| 亚洲一区二区av在线| 欧美激情综合在线| 日韩无一区二区| 91极品美女在线| 日本不卡视频一二三区| 一区二区三区四区精品在线视频 | 亚洲成av人**亚洲成av**| 国产精品麻豆视频| 欧美日韩国产乱码电影| 国内精品嫩模私拍在线| 综合中文字幕亚洲| 欧美大片一区二区三区| 成人美女视频在线看| 午夜精品aaa| 欧美经典三级视频一区二区三区| 欧美综合在线视频| 久久99国产乱子伦精品免费| 亚洲国产精品黑人久久久| 欧美乱妇一区二区三区不卡视频| 国产福利一区二区三区在线视频| 午夜国产精品一区| 亚洲一区二区五区| 首页国产欧美久久| 免费成人在线网站| 国模无码大尺度一区二区三区| 国产综合久久久久影院| 成人动漫中文字幕| 国产精品羞羞答答xxdd| 蜜臀av亚洲一区中文字幕| 亚洲不卡一区二区三区| 青青青伊人色综合久久| 国产精品影视天天线| 91在线播放网址| 欧美一区二区在线视频| 亚洲精品在线观看视频| 国产精品久久久久永久免费观看| 亚洲黄色免费电影| 99国产精品国产精品久久| 欧美大度的电影原声| 亚洲私人影院在线观看| 五月天久久比比资源色| 成人一区二区三区在线观看| 欧美美女一区二区| 亚洲精品一二三| 国产精品99久| 91视频你懂的| 欧美一区二区三区视频在线 | 国产精品久久久久久久午夜片| 亚洲色图一区二区| 麻豆精品国产91久久久久久| 99re8在线精品视频免费播放| 欧美三级韩国三级日本三斤| 精品99999| 一区二区三区电影在线播| 国产麻豆精品theporn| 欧洲在线/亚洲| 国产精品国产三级国产有无不卡| 亚洲一区二区三区中文字幕| 国产一区二区福利视频| 日韩一级黄色大片| 成人午夜av电影| 欧美日韩在线一区二区| 亚洲另类中文字| 91免费精品国自产拍在线不卡| 欧美美女网站色| 亚洲一区二区三区小说| 成人sese在线| 欧美国产日本韩| av不卡免费在线观看| 亚洲国产精品t66y| 97精品久久久久中文字幕| 《视频一区视频二区| 97超碰欧美中文字幕| 亚洲丝袜自拍清纯另类| 色8久久人人97超碰香蕉987| 一区二区久久久久| 69p69国产精品| 免费高清成人在线| 中文字幕制服丝袜一区二区三区| 国产成人精品在线看| 亚洲欧洲国产专区| 国产精品久久看| 在线视频国内自拍亚洲视频| 午夜精品久久久久久久久久| 欧美高清视频在线高清观看mv色露露十八| 亚洲午夜羞羞片| 久久先锋影音av鲁色资源网| 粉嫩一区二区三区在线看| 一级女性全黄久久生活片免费| 欧美一二三四在线| 99久久久精品| 色呦呦国产精品| 国产美女精品人人做人人爽 | 欧美不卡123| 在线观看视频一区| 国产精品1024| 日韩精品成人一区二区在线| 中文字幕av资源一区| 欧美一区二区视频免费观看| 欧美亚洲高清一区| av电影一区二区| 国产一区二区在线看| 免费成人结看片| 视频在线在亚洲| 亚洲bt欧美bt精品| 一区二区三区四区亚洲| 亚洲一二三专区| 国产精品人人做人人爽人人添| 欧美区视频在线观看| 91福利在线导航| 在线视频中文字幕一区二区| 一本久道中文字幕精品亚洲嫩| 国产成人丝袜美腿| 国产91丝袜在线18| 成+人+亚洲+综合天堂| 99久久国产综合精品色伊| av动漫一区二区| 91丝袜国产在线播放| 白白色 亚洲乱淫| 不卡在线视频中文字幕| 国产成人精品免费一区二区| 国产成人免费视频网站| 成人aa视频在线观看| 欧美午夜理伦三级在线观看| 欧美日韩你懂的| 精品国精品国产尤物美女| 亚洲国产精品ⅴa在线观看| 亚洲日本在线视频观看| 亚洲成人综合视频| 美美哒免费高清在线观看视频一区二区 | 国产亚洲精品aa| 亚洲欧洲日产国产综合网| 亚洲va韩国va欧美va| 老司机精品视频一区二区三区| 精品夜夜嗨av一区二区三区| 国产suv精品一区二区6| 欧美最猛黑人xxxxx猛交| 精品国产1区二区| 国产精品理论在线观看| 日韩精品久久理论片| av激情综合网| 精品999久久久| 亚洲欧美日韩一区二区| 青青草一区二区三区| 色婷婷综合久久久| 久久久精品综合| 石原莉奈在线亚洲三区| 3atv在线一区二区三区| 欧美国产精品一区| 精品一区二区影视| 欧美久久一二三四区| 欧美国产1区2区| 亚洲午夜久久久久中文字幕久| 美女视频黄频大全不卡视频在线播放| 欧美精品免费视频| 国产呦萝稀缺另类资源| 国产精品全国免费观看高清| 99天天综合性| 亚洲三级理论片| 成人综合婷婷国产精品久久 | 日韩欧美一区在线| 日韩电影免费一区| 在线电影一区二区三区| 日韩影视精彩在线| 日韩一区二区免费电影| 男女男精品视频| 久久久欧美精品sm网站| 国产福利一区在线| 国产精品久久久久久一区二区三区| 成人h精品动漫一区二区三区| 国产精品国产三级国产普通话三级| 国产一区二区在线观看免费| 国产精品成人网| 色婷婷香蕉在线一区二区|