Package javax.sip

Examples of javax.sip.ServerTransaction.sendResponse()


                    }
                } else if (request.getMethod().equals(Request.CANCEL)) {
                    ServerTransaction stx = requestEvent.getServerTransaction();
                    Response okResponse = messageFactory.createResponse(200,
                            request);
                    stx.sendResponse(okResponse);

                }
            } catch (Exception ex) {
                logger.error("Unexpected exception", ex);
                TestCase.fail("Unexpected exception");
View Full Code Here


                    }
                } else if (request.getMethod().equals(Request.CANCEL)) {
                    ServerTransaction stx = requestEvent.getServerTransaction();
                    Response okResponse = messageFactory.createResponse(200,
                            request);
                    stx.sendResponse(okResponse);
                    this.cancelSeen = true;

                } else if (request.getMethod().equals(Request.BYE)) {
                    ServerTransaction stx = requestEvent.getServerTransaction();
                    Response okResponse = messageFactory.createResponse(200,
View Full Code Here

                } else if (request.getMethod().equals(Request.BYE)) {
                    ServerTransaction stx = requestEvent.getServerTransaction();
                    Response okResponse = messageFactory.createResponse(200,
                            request);
                    stx.sendResponse(okResponse);
                    this.byeSeen = true;

                }
            } catch (Exception ex) {
                logger.error("Unexpected exception", ex);
View Full Code Here

                    // Strip the topmost via header
                    Response newResponse = (Response) response.clone();
                    newResponse.removeFirst(ViaHeader.NAME);
                    // The server tx goes to the terminated state.

                    st.sendResponse(newResponse);
                } else {
                    // Client tx has already terminated but the UA is
                    // retransmitting
                    // just forward the response statelessly.
                    // Strip the topmost via header
View Full Code Here

                toHeader.setTag("4321"); // Application is supposed to set.
                okResponse.addHeader(contactHeader);
                ServerTransaction stx = requestEvent.getServerTransaction();
                if ( stx == null ) {
                    stx = sipProvider.getNewServerTransaction(request);
                    stx.sendResponse(okResponse);
                }
            } catch (TransactionAlreadyExistsException ex) {
                this.sawTransactionExistsException = true;
                System.out.println("Saw TransactionAlreadyExistsException");
            } catch (Exception ex) {
View Full Code Here

            // We are the UAC so the only request we get is the BYE.
            if (request.getMethod().equals(Request.BYE))
                processBye(request, serverTransactionId);
            else {
                try {
                    serverTransactionId.sendResponse(messageFactory
                            .createResponse(202, request));
                } catch (Exception e) {
                    fail("Unexpected exception");
                    logger.error("Unexpected exception", e);
                }
View Full Code Here

        dialog = st.getDialog();
        if (dialog != null) {
          System.out.println("Dialog " + dialog);
          System.out.println("Dialog state " + dialog.getState());
        }
        st.sendResponse(response);
        TransactionExt stExt = ( TransactionExt)st  ;
        Certificate[] certs = stExt.getPeerCertificates();
        System.out.println("Certs = " + certs);
        if(certs != null) {
          for (Certificate cert: certs ) {
View Full Code Here

        response = messageFactory.createResponse(200, request);
        toHeader = (ToHeader) response.getHeader(ToHeader.NAME);
        toHeader.setTag("4321"); // Application is supposed to set.
        response.addHeader(contactHeader);
        st.sendResponse(response);
        this.inviteTid = st;
      } catch (Exception ex) {
        ex.printStackTrace();
        TlsTest.fail("Unexpected exception");
      }
View Full Code Here

            ServerTransaction st = requestEvent.getServerTransaction();
            if (st == null) {
                st = sipProvider.getNewServerTransaction(requestEvent
                        .getRequest());
            }
            st.sendResponse(response);

        } catch (Exception ex) {
            ex.printStackTrace();
            fail("Unexpected exception ");
        }
View Full Code Here

                dialog = st.getDialog();
                if (dialog != null) {
                    logger.info("Dialog " + dialog);
                    logger.info("Dialog state " + dialog.getState());
                }
                st.sendResponse(response);
                response = protocolObjects.messageFactory.createResponse(finalResponse, request);
                toHeader = (ToHeader) response.getHeader(ToHeader.NAME);
                toHeader.setTag("4321");
                // Application is supposed to set.
                response.addHeader(contactHeader);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.