Package javax.sip

Examples of javax.sip.Transaction


            }

        }

        public void processTimeout(javax.sip.TimeoutEvent timeoutEvent) {
            Transaction transaction;
            if (timeoutEvent.isServerTransaction()) {
                transaction = timeoutEvent.getServerTransaction();
            } else {
                transaction = timeoutEvent.getClientTransaction();
            }
            logger.info("state = " + transaction.getState());
            logger.info("dialog = " + transaction.getDialog());
            logger.info("dialogState = " + transaction.getDialog().getState());
            logger.info("Transaction Time out");
        }
View Full Code Here


            }

        }

        public void processTimeout(javax.sip.TimeoutEvent timeoutEvent) {
            Transaction transaction;
            if (timeoutEvent.isServerTransaction()) {
                transaction = timeoutEvent.getServerTransaction();
            } else {
                transaction = timeoutEvent.getClientTransaction();
            }
            logger.info("state = " + transaction.getState());
            logger.info("dialog = " + transaction.getDialog());
            logger.info("dialogState = "
                    + transaction.getDialog().getState());
            logger.info("Transaction Time out");
        }
View Full Code Here

        public void processResponse(ResponseEvent responseReceivedEvent) {
          logger.info("Got a response");

            Response response = (Response) responseReceivedEvent.getResponse();
            Transaction tid = responseReceivedEvent.getClientTransaction();

            logger.info("Response received with client transaction id " + tid
                    + ":\n" + response.getStatusCode());
            if (tid != null) {
        logger.info("Dialog = " + responseReceivedEvent.getDialog());
View Full Code Here

        public void processResponse(ResponseEvent responseReceivedEvent) {
            logger.info("Got a response");

            Response response = (Response) responseReceivedEvent.getResponse();
            Transaction tid = responseReceivedEvent.getClientTransaction();

            logger.info("Response received with client transaction id " + tid + ":\n"
                    + response.getStatusCode());
            if (tid == null) {
                logger.info("Stray response -- dropping ");
                return;
            }
            logger.info("transaction state is " + tid.getState());
            logger.info("Dialog = " + tid.getDialog());
            logger.info("Dialog State is " + tid.getDialog().getState());
            SipProvider provider = (SipProvider) responseReceivedEvent.getSource();

            try {
                if (response.getStatusCode() == Response.OK
                        && ((CSeqHeader) response.getHeader(CSeqHeader.NAME)).getMethod().equals(
                                Request.INVITE)) {

                    // Request cancel = inviteTid.createCancel();
                    // ClientTransaction ct =
                    // sipProvider.getNewClientTransaction(cancel);
                    Dialog dialog = tid.getDialog();
                    CSeqHeader cseq = (CSeqHeader) response.getHeader(CSeqHeader.NAME);
                    Request ackRequest = dialog.createAck(cseq.getSeqNumber());
                    logger.info("Ack request to send = " + ackRequest);
                    logger.info("Sending ACK");
                    dialog.sendAck(ackRequest);
View Full Code Here

        {
            // reply to the canceled request and maybe to the received CANCEL
            // and also send CANCELs to pending client transactions
            JipletDialog jdialog = jiplet.getDialog(serverTransaction
                    .getDialog(), true);
            Transaction firstTransaction = (Transaction) jdialog
                    .getAttribute("firstTransaction");
            if (firstTransaction == null)
            {
                throw new JipletException(
                        "ERROR, RequestForwarding Cancel, the first transaction"
View Full Code Here

                    .warn("Could not obtain the jiplet dialog mapping while canceling a proxy."
                            + " This should not happen");
            return;
        }

        Transaction t = (Transaction) jdialog.getAttribute("firstTransaction");
        if (t == null)
        {
            JipletLogger
                    .warn("Could not find the first transaction while canceling a proxy."
                            + " Cannot cancel the proxy");
View Full Code Here

                        .warn("Could not obtain the SIP dialog while finding the peer dialog."
                                + " Cannot proxy anything to the peer");
                return null;
            }
           
            Transaction transaction = (Transaction) jdialog.getAttribute("firstTransaction");
            if (transaction == null)
            {
                JipletLogger
                        .warn("Could not find the first transaction while finding the peer dialog."
                                + " Cannot proxy anything to the peer");
View Full Code Here

    public void processResponse(ResponseEvent responseReceivedEvent) {
        if (LOG.isDebugEnabled()) {
            LOG.debug("Response received at Subscriber");
        }
        Response response = responseReceivedEvent.getResponse();
        Transaction clientTransactionId = responseReceivedEvent.getClientTransaction();

        if (LOG.isDebugEnabled()) {
            LOG.debug("Response received with client transaction id " + clientTransactionId + ":" + response.getStatusCode());
        }
        if (clientTransactionId == null) {
View Full Code Here

    }
   
    public void processResponse(ResponseEvent responseReceivedEvent) {
        LOG.debug("Response received at Subscriber");
        Response response = responseReceivedEvent.getResponse();
        Transaction clientTransactionId = responseReceivedEvent.getClientTransaction();

        LOG.debug("Response received with client transaction id {}:{}", clientTransactionId, response.getStatusCode());
        if (clientTransactionId == null) {
            if (LOG.isWarnEnabled()) {
                LOG.warn("Stray response -- dropping");
View Full Code Here


            public void processResponse(ResponseEvent responseReceivedEvent) {
                logger.info("Got a response");
                Response response = (Response) responseReceivedEvent.getResponse();
                Transaction tid = responseReceivedEvent.getClientTransaction();

                logger.info("Response received with client transaction id "
                        + tid + ":\n" + response);
                try {
                    if (response.getStatusCode() == Response.OK
                            && ((CSeqHeader) response.getHeader(CSeqHeader.NAME))
                                    .getMethod().equals(Request.INVITE)) {
                        Dialog dialog = tid.getDialog();
                        CSeqHeader cseq = (CSeqHeader) response.getHeader(CSeqHeader.NAME);
                        Request ackRequest = dialog.createAck(cseq.getSeqNumber());
                        dialog.sendAck(ackRequest);
                    }
                    if ( tid != null ) {
                        Dialog dialog = tid.getDialog();
                        logger.info("Dialog State = " + dialog.getState());
                    }
                } catch (Exception ex) {
                    String s = "Unexpected exception";
                    logger.error(s,ex);
View Full Code Here

TOP

Related Classes of javax.sip.Transaction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.