Search in sources :

Example 66 with SipURI

use of javax.sip.address.SipURI in project load-balancer by RestComm.

the class TestSipListener method processNotify.

public void processNotify(RequestEvent requestEvent, ServerTransaction serverTransactionId) {
    SipProvider provider = (SipProvider) requestEvent.getSource();
    Request notify = requestEvent.getRequest();
    try {
        logger.info("subscriber:  got a notify count  " + this.notifyCount++);
        if (serverTransactionId == null) {
            logger.info("subscriber:  null TID.");
            serverTransactionId = provider.getNewServerTransaction(notify);
        }
        Dialog dialog = serverTransactionId.getDialog();
        // if ( dialog != subscriberDialog ) {
        // if (forkedDialog == null) {
        // forkedDialog = dialog;
        // } else  {
        // AbstractSubsnotifyTestCase.assertTrue("Dialog should be either the subscriber dialog ",
        // forkedDialog  == dialog);
        // }
        // }
        // 
        // this.dialogs.add(dialog);
        logger.info("Dialog State = " + dialog.getState());
        Response response = protocolObjects.messageFactory.createResponse(200, notify);
        // SHOULD add a Contact
        ContactHeader contact = (ContactHeader) contactHeader.clone();
        ((SipURI) contact.getAddress().getURI()).setParameter("id", "sub");
        response.addHeader(contact);
        logger.info("Transaction State = " + serverTransactionId.getState());
        serverTransactionId.sendResponse(response);
        logger.info("Dialog State = " + dialog.getState());
        SubscriptionStateHeader subscriptionState = (SubscriptionStateHeader) notify.getHeader(SubscriptionStateHeader.NAME);
        // Subscription is terminated?
        String state = subscriptionState.getState();
        allSubscriptionStates.add(state.toLowerCase());
        if (notify.getRawContent() != null) {
            this.lastMessageContent = new String(notify.getRawContent());
            allMessagesContent.add(new String(lastMessageContent));
        }
        if (state.equalsIgnoreCase(SubscriptionStateHeader.TERMINATED)) {
            if (subscriptionState.getReasonCode() == null) {
                dialog.delete();
            }
        } else if (state.equalsIgnoreCase(SubscriptionStateHeader.ACTIVE)) {
            if ("reg".equalsIgnoreCase(((EventHeader) notify.getHeader(EventHeader.NAME)).getEventType())) {
                if (sendByeBeforeTerminatingNotify) {
                    dialog.terminateOnBye(false);
                    sendBye();
                    Thread.sleep(1000);
                }
                logger.info("Subscriber: sending unSUBSCRIBE");
                // Else we end it ourselves
                Request unsubscribe = dialog.createRequest(Request.SUBSCRIBE);
                logger.info("dialog created:" + unsubscribe);
                // SHOULD add a Contact (done by dialog), lets mark it to test updates
                // ((SipURI) dialog.getLocalParty().getURI()).setParameter( "id", "unsub" );
                ExpiresHeader expires = protocolObjects.headerFactory.createExpiresHeader(0);
                unsubscribe.addHeader(expires);
                // JvB note : stack should do this!
                // copy
                unsubscribe.addHeader(notify.getHeader(EventHeader.NAME));
                // event
                // header
                logger.info("Sending Unsubscribe : " + unsubscribe);
                logger.info("unsubscribe dialog  " + dialog);
                ClientTransaction ct = sipProvider.getNewClientTransaction(unsubscribe);
                dialog.sendRequest(ct);
                if (sendByeAfterTerminatingNotify) {
                    Thread.sleep(1000);
                    sendBye();
                }
            } else if (sendByeBeforeTerminatingNotify) {
                sendBye();
            }
        } else {
            // pending
            logger.info("Subscriber: state now " + state);
        }
    } catch (Exception ex) {
        logger.error("Unexpected exception", ex);
    }
}
Also used : Response(javax.sip.message.Response) ContactHeader(javax.sip.header.ContactHeader) Dialog(javax.sip.Dialog) SubscriptionStateHeader(javax.sip.header.SubscriptionStateHeader) ClientTransaction(javax.sip.ClientTransaction) Request(javax.sip.message.Request) EventHeader(javax.sip.header.EventHeader) ExpiresHeader(javax.sip.header.ExpiresHeader) SipURI(javax.sip.address.SipURI) InvalidArgumentException(javax.sip.InvalidArgumentException) ParseException(java.text.ParseException) SipException(javax.sip.SipException) TransactionDoesNotExistException(javax.sip.TransactionDoesNotExistException) TransactionUnavailableException(javax.sip.TransactionUnavailableException) SipProvider(javax.sip.SipProvider)

Example 67 with SipURI

use of javax.sip.address.SipURI in project load-balancer by RestComm.

the class TestSipListener method processInvite.

/**
 * Process the invite request.
 */
public void processInvite(RequestEvent requestEvent, ServerTransaction serverTransaction) {
    inviteReceived = true;
    SipProvider sipProvider = (SipProvider) requestEvent.getSource();
    Request request = requestEvent.getRequest();
    inviteRequest = request;
    logger.info("shootme: got an Invite " + request);
    try {
        ServerTransaction st = requestEvent.getServerTransaction();
        if (st == null) {
            st = sipProvider.getNewServerTransaction(request);
        }
        inviteServerTid = st;
        Dialog dialog = st.getDialog();
        if (request.getHeader(JoinHeader.NAME) != null) {
            setJoinRequestReceived(true);
            this.joinDialog = dialog;
        } else if (request.getHeader(ReplacesHeader.NAME) != null) {
            setReplacesRequestReceived(true);
            this.replacesDialog = dialog;
        } else {
            this.dialogCount++;
            this.dialog = dialog;
        }
        logger.info("Shootme: dialog = " + dialog);
        this.inviteRequest = request;
        boolean sendReliably = false;
        RequireHeader requireHeader = (RequireHeader) request.getHeader(RequireHeader.NAME);
        if (requireHeader != null && "100rel".equalsIgnoreCase(requireHeader.getOptionTag().trim())) {
            sendReliably = true;
        }
        if (respondWithError == null)
            for (int provisionalResponseToSend : provisionalResponsesToSend) {
                Thread.sleep(getTimeToWaitBetweenProvisionnalResponse());
                Response response = protocolObjects.messageFactory.createResponse(provisionalResponseToSend, request);
                if (provisionalResponseToSend >= Response.TRYING && provisionalResponseToSend < Response.OK) {
                    ToHeader toHeader = (ToHeader) response.getHeader(ToHeader.NAME);
                    if (provisionalResponseToSend != Response.TRYING && toHeader.getTag() == null) {
                        // Application is supposed to set.
                        toHeader.setTag(TO_TAG);
                    }
                    if (sendReliably && provisionalResponseToSend != Response.TRYING) {
                        requireHeader = protocolObjects.headerFactory.createRequireHeader("100rel");
                        response.addHeader(requireHeader);
                        Header rseqHeader = protocolObjects.headerFactory.createRSeqHeader(rseqNumber.getAndIncrement());
                        response.addHeader(rseqHeader);
                        dialog.sendReliableProvisionalResponse(response);
                    } else {
                        st.sendResponse(response);
                        eventListener.uasAfterResponse(response.getStatusCode(), appServer);
                    }
                }
            }
        if (respondWithError != null && !sendReliably) {
            Response response = protocolObjects.messageFactory.createResponse(respondWithError, request);
            response.setReasonPhrase("Unable to setup media services");
            st.sendResponse(response);
            eventListener.uasAfterResponse(response.getStatusCode(), appServer);
            return;
        }
        ContactHeader contactHeader = (ContactHeader) request.getHeader(ContactHeader.NAME);
        if (contactHeader != null && "0.0.0.0".equals(((SipURI) contactHeader.getAddress().getURI()).getHost())) {
            abortProcessing = true;
            throw new IllegalArgumentException("we received a contact header with 0.0.0.0 in an INVITE !");
        }
        if (!waitForCancel) {
            Address address = null;
            if (!isIpv6)
                address = protocolObjects.addressFactory.createAddress("Shootme <sip:127.0.0.1:" + myPort + ";transport=" + protocolObjects.transport + ">");
            else
                address = protocolObjects.addressFactory.createAddress("Shootme <sip:[::1]:" + myPort + ";transport=" + protocolObjects.transport + ">");
            contactHeader = protocolObjects.headerFactory.createContactHeader(address);
            setFinalResponse(protocolObjects.messageFactory.createResponse(finalResponseToSend, request));
            if (testAckViaParam) {
                ViaHeader viaHeader = (ViaHeader) getFinalResponse().getHeader(ViaHeader.NAME);
                viaHeader.setParameter("testAckViaParam", "true");
            }
            ToHeader toHeader = (ToHeader) getFinalResponse().getHeader(ToHeader.NAME);
            if (toHeader.getTag() == null) {
                // Application is supposed to set.
                toHeader.setTag(TO_TAG);
            }
            getFinalResponse().addHeader(contactHeader);
            if (!sendReliably) {
                Thread.sleep(2000);
                st.sendResponse(getFinalResponse());
                eventListener.uasAfterResponse(getFinalResponse().getStatusCode(), appServer);
            }
        } else {
            logger.info("Waiting for CANCEL, stopping the INVITE processing ");
            return;
        }
        if (("join").equalsIgnoreCase(((SipUri) request.getRequestURI()).getUser())) {
            sendJoinMessage = true;
        }
        if (("replaces").equalsIgnoreCase(((SipUri) request.getRequestURI()).getUser())) {
            sendReplacesMessage = true;
        }
    } catch (Exception ex) {
        logger.error("unexpected exception", ex);
        throw new RuntimeException(ex);
    }
}
Also used : ContactHeader(javax.sip.header.ContactHeader) Address(javax.sip.address.Address) Request(javax.sip.message.Request) RequireHeader(javax.sip.header.RequireHeader) SipURI(javax.sip.address.SipURI) InvalidArgumentException(javax.sip.InvalidArgumentException) ParseException(java.text.ParseException) SipException(javax.sip.SipException) TransactionDoesNotExistException(javax.sip.TransactionDoesNotExistException) TransactionUnavailableException(javax.sip.TransactionUnavailableException) Response(javax.sip.message.Response) ReasonHeader(javax.sip.header.ReasonHeader) RequireHeader(javax.sip.header.RequireHeader) SIPETagHeader(javax.sip.header.SIPETagHeader) ContactHeader(javax.sip.header.ContactHeader) ReferToHeader(javax.sip.header.ReferToHeader) ViaHeader(javax.sip.header.ViaHeader) SIPIfMatchHeader(javax.sip.header.SIPIfMatchHeader) AuthorizationHeader(javax.sip.header.AuthorizationHeader) CallIdHeader(javax.sip.header.CallIdHeader) ContentLengthHeader(javax.sip.header.ContentLengthHeader) ExtensionHeader(javax.sip.header.ExtensionHeader) ExpiresHeader(javax.sip.header.ExpiresHeader) Header(javax.sip.header.Header) ReplacesHeader(gov.nist.javax.sip.header.extensions.ReplacesHeader) CSeqHeader(javax.sip.header.CSeqHeader) ContentTypeHeader(javax.sip.header.ContentTypeHeader) JoinHeader(gov.nist.javax.sip.header.extensions.JoinHeader) MaxForwardsHeader(javax.sip.header.MaxForwardsHeader) ToHeader(javax.sip.header.ToHeader) RouteHeader(javax.sip.header.RouteHeader) ProxyAuthorizationHeader(javax.sip.header.ProxyAuthorizationHeader) SubscriptionStateHeader(javax.sip.header.SubscriptionStateHeader) EventHeader(javax.sip.header.EventHeader) FromHeader(javax.sip.header.FromHeader) ProxyAuthenticateHeader(javax.sip.header.ProxyAuthenticateHeader) RecordRouteHeader(javax.sip.header.RecordRouteHeader) ViaHeader(javax.sip.header.ViaHeader) Dialog(javax.sip.Dialog) ReferToHeader(javax.sip.header.ReferToHeader) ToHeader(javax.sip.header.ToHeader) ServerTransaction(javax.sip.ServerTransaction) SipProvider(javax.sip.SipProvider)

Example 68 with SipURI

use of javax.sip.address.SipURI in project load-balancer by RestComm.

the class TestSipListener method processAck.

public void processAck(Request request, ServerTransaction serverTransactionId) {
    try {
        logger.info("shootist:  got a " + request);
        logger.info("shootist:  got an ACK. ServerTxId = " + serverTransactionId);
        ackReceived = true;
        // we don't count retransmissions
        if (serverTransactionId != null) {
            ackCount++;
        }
        if (testAckViaParam) {
            ViaHeader viaHeader = (ViaHeader) request.getHeader(ViaHeader.NAME);
            String param = viaHeader.getParameter("testAckViaParam");
            if (param != null) {
                abortProcessing = true;
                logger.error("the Via Param set in the response shouldn't be present in the ACK");
                return;
            }
        }
        if (sendBye) {
            Thread.sleep(timeToWaitBeforeBye);
            if (serverTransactionId != null && serverTransactionId.getDialog() != null) {
                Request byeRequest = serverTransactionId.getDialog().createRequest(Request.BYE);
                logger.info("BYE created : " + byeRequest);
                ClientTransaction ct = sipProvider.getNewClientTransaction(byeRequest);
                logger.info("Sending BYE : " + byeRequest);
                serverTransactionId.getDialog().sendRequest(ct);
                logger.info("Dialog State = " + serverTransactionId.getDialog().getState());
            }
        }
        if (!joinRequestReceived && sendJoinMessage) {
            String fromUser = "join";
            String fromHost = "sip-servlets.com";
            SipURI fromAddress = protocolObjects.addressFactory.createSipURI(fromUser, fromHost);
            String toUser = "join-receiver";
            String toHost = "sip-servlets.com";
            SipURI toAddress = protocolObjects.addressFactory.createSipURI(toUser, toHost);
            CallIdHeader callIdHeader = (CallIdHeader) request.getHeader(CallIdHeader.NAME);
            FromHeader fromHeader = (FromHeader) request.getHeader(FromHeader.NAME);
            ToHeader toHeader = (ToHeader) request.getHeader(ToHeader.NAME);
            JoinHeader joinHeader = (JoinHeader) ((HeaderFactoryExt) protocolObjects.headerFactory).createJoinHeader(callIdHeader.getCallId(), toHeader.getTag(), fromHeader.getTag());
            sendSipRequest("MESSAGE", fromAddress, toAddress, joinHeader.toString(), null, false);
        }
        if (!isReplacesRequestReceived() && sendReplacesMessage) {
            String fromUser = "replaces";
            String fromHost = "sip-servlets.com";
            SipURI fromAddress = protocolObjects.addressFactory.createSipURI(fromUser, fromHost);
            String toUser = "replaces-receiver";
            String toHost = "sip-servlets.com";
            SipURI toAddress = protocolObjects.addressFactory.createSipURI(toUser, toHost);
            CallIdHeader callIdHeader = (CallIdHeader) request.getHeader(CallIdHeader.NAME);
            FromHeader fromHeader = (FromHeader) request.getHeader(FromHeader.NAME);
            ToHeader toHeader = (ToHeader) request.getHeader(ToHeader.NAME);
            ReplacesHeader replacesHeader = (ReplacesHeader) ((HeaderFactoryExt) protocolObjects.headerFactory).createReplacesHeader(callIdHeader.getCallId(), toHeader.getTag(), fromHeader.getTag());
            sendSipRequest("MESSAGE", fromAddress, toAddress, replacesHeader.toString(), null, false);
        }
        if (joinRequestReceived) {
            sendBye();
            sendBye(joinDialog);
        }
        if (isReplacesRequestReceived()) {
            sendBye();
            sendBye(replacesDialog);
        }
        if (sendReinvite && !reinviteSent) {
            List<Header> headers = new ArrayList<Header>();
            Header reinviteHeader = protocolObjects.headerFactory.createHeader("ReInvite", "true");
            headers.add(reinviteHeader);
            sendInDialogSipRequest("INVITE", null, null, null, headers, null);
            reinviteSent = true;
            return;
        }
    } catch (Exception ex) {
        ex.printStackTrace();
    }
}
Also used : FromHeader(javax.sip.header.FromHeader) ClientTransaction(javax.sip.ClientTransaction) Request(javax.sip.message.Request) ArrayList(java.util.ArrayList) SipURI(javax.sip.address.SipURI) InvalidArgumentException(javax.sip.InvalidArgumentException) ParseException(java.text.ParseException) SipException(javax.sip.SipException) TransactionDoesNotExistException(javax.sip.TransactionDoesNotExistException) TransactionUnavailableException(javax.sip.TransactionUnavailableException) ReasonHeader(javax.sip.header.ReasonHeader) RequireHeader(javax.sip.header.RequireHeader) SIPETagHeader(javax.sip.header.SIPETagHeader) ContactHeader(javax.sip.header.ContactHeader) ReferToHeader(javax.sip.header.ReferToHeader) ViaHeader(javax.sip.header.ViaHeader) SIPIfMatchHeader(javax.sip.header.SIPIfMatchHeader) AuthorizationHeader(javax.sip.header.AuthorizationHeader) CallIdHeader(javax.sip.header.CallIdHeader) ContentLengthHeader(javax.sip.header.ContentLengthHeader) ExtensionHeader(javax.sip.header.ExtensionHeader) ExpiresHeader(javax.sip.header.ExpiresHeader) Header(javax.sip.header.Header) ReplacesHeader(gov.nist.javax.sip.header.extensions.ReplacesHeader) CSeqHeader(javax.sip.header.CSeqHeader) ContentTypeHeader(javax.sip.header.ContentTypeHeader) JoinHeader(gov.nist.javax.sip.header.extensions.JoinHeader) MaxForwardsHeader(javax.sip.header.MaxForwardsHeader) ToHeader(javax.sip.header.ToHeader) RouteHeader(javax.sip.header.RouteHeader) ProxyAuthorizationHeader(javax.sip.header.ProxyAuthorizationHeader) SubscriptionStateHeader(javax.sip.header.SubscriptionStateHeader) EventHeader(javax.sip.header.EventHeader) FromHeader(javax.sip.header.FromHeader) ProxyAuthenticateHeader(javax.sip.header.ProxyAuthenticateHeader) RecordRouteHeader(javax.sip.header.RecordRouteHeader) ViaHeader(javax.sip.header.ViaHeader) ReferToHeader(javax.sip.header.ReferToHeader) ToHeader(javax.sip.header.ToHeader) CallIdHeader(javax.sip.header.CallIdHeader) ReplacesHeader(gov.nist.javax.sip.header.extensions.ReplacesHeader) JoinHeader(gov.nist.javax.sip.header.extensions.JoinHeader)

Example 69 with SipURI

use of javax.sip.address.SipURI in project load-balancer by RestComm.

the class TestSipListener method processMessage.

private void processMessage(Request request, ServerTransaction serverTransactionId) {
    if (request.toString().contains("408 received")) {
        txTimeoutReceived = true;
    }
    ServerTransaction serverTransaction = null;
    messageRequest = request;
    try {
        serverTransaction = (serverTransactionId == null ? sipProvider.getNewServerTransaction(request) : serverTransactionId);
    } catch (javax.sip.TransactionAlreadyExistsException ex) {
        ex.printStackTrace();
        return;
    } catch (javax.sip.TransactionUnavailableException ex1) {
        ex1.printStackTrace();
        return;
    }
    ContentTypeHeader contentTypeHeader = (ContentTypeHeader) request.getHeader(ContentTypeHeader.NAME);
    boolean sendInvitewithJoin = false;
    boolean sendInvitewithReplaces = false;
    if (contentTypeHeader != null) {
        if (TEXT_CONTENT_TYPE.equals(contentTypeHeader.getContentType())) {
            this.lastMessageContent = new String(request.getRawContent());
            allMessagesContent.add(new String(lastMessageContent));
            if (lastMessageContent.indexOf("Join : ") != -1) {
                this.lastMessageContent = lastMessageContent.substring("Join : ".length());
                sendInvitewithJoin = true;
            }
            if (lastMessageContent.indexOf("Replaces : ") != -1) {
                this.lastMessageContent = lastMessageContent.substring("Replaces : ".length());
                sendInvitewithReplaces = true;
            }
        }
    } else {
        if (request.getHeader("From").toString().contains("b2bua@sip-servlets"))
            b2buamessagereceived = true;
    }
    try {
        Response okResponse = protocolObjects.messageFactory.createResponse(Response.OK, request);
        ToHeader toHeader = (ToHeader) okResponse.getHeader(ToHeader.NAME);
        if (toHeader.getTag() == null) {
            toHeader.setTag(Integer.toString(new Random().nextInt(10000000)));
        }
        // okResponse.addHeader(contactHeader);
        serverTransaction.sendResponse(okResponse);
    } catch (Exception ex) {
        ex.printStackTrace();
        logger.error("error sending OK response to message", ex);
    }
    if (sendInvitewithJoin) {
        try {
            String fromUser = "receiver";
            String fromHost = "sip-servlets.com";
            SipURI fromAddress = protocolObjects.addressFactory.createSipURI(fromUser, fromHost);
            String toUser = "join-receiver";
            String toHost = "sip-servlets.com";
            SipURI toAddress = protocolObjects.addressFactory.createSipURI(toUser, toHost);
            String[] headerNames = new String[] { "Join" };
            String[] headerContents = new String[] { lastMessageContent };
            sendSipRequest("INVITE", fromAddress, toAddress, null, null, false, headerNames, headerContents, true);
        } catch (Exception ex) {
            ex.printStackTrace();
            logger.error("error sending INVITE with Join", ex);
        }
    }
    if (sendInvitewithReplaces) {
        try {
            String fromUser = "receiver";
            String fromHost = "sip-servlets.com";
            SipURI fromAddress = protocolObjects.addressFactory.createSipURI(fromUser, fromHost);
            String toUser = "replaces-receiver";
            String toHost = "sip-servlets.com";
            SipURI toAddress = protocolObjects.addressFactory.createSipURI(toUser, toHost);
            String[] headerNames = new String[] { "Replaces" };
            String[] headerContents = new String[] { lastMessageContent };
            sendSipRequest("INVITE", fromAddress, toAddress, null, null, false, headerNames, headerContents, true);
        } catch (Exception ex) {
            ex.printStackTrace();
            logger.error("error sending INVITE with Join", ex);
        }
    }
}
Also used : ContentTypeHeader(javax.sip.header.ContentTypeHeader) SipURI(javax.sip.address.SipURI) InvalidArgumentException(javax.sip.InvalidArgumentException) ParseException(java.text.ParseException) SipException(javax.sip.SipException) TransactionDoesNotExistException(javax.sip.TransactionDoesNotExistException) TransactionUnavailableException(javax.sip.TransactionUnavailableException) Response(javax.sip.message.Response) Random(java.util.Random) ReferToHeader(javax.sip.header.ReferToHeader) ToHeader(javax.sip.header.ToHeader) TransactionUnavailableException(javax.sip.TransactionUnavailableException) ServerTransaction(javax.sip.ServerTransaction)

Example 70 with SipURI

use of javax.sip.address.SipURI in project load-balancer by RestComm.

the class TestSipListener method sendBye.

/**
 * @throws SipException
 * @throws TransactionUnavailableException
 * @throws TransactionDoesNotExistException
 */
public void sendBye(final Dialog dialog) throws SipException, TransactionUnavailableException, TransactionDoesNotExistException {
    Thread th = new Thread() {

        public void run() {
            try {
                if (sendByeInNewThread)
                    Thread.sleep(600);
                Request byeRequest = dialog.createRequest(Request.BYE);
                URI uri = ((FromHeader) byeRequest.getHeader(FromHeader.NAME)).getAddress().getURI();
                if (uri.isSipURI()) {
                    ((SipURI) uri).removeParameter("fromParam");
                }
                ClientTransaction ct = sipProvider.getNewClientTransaction(byeRequest);
                logger.info("Sending BYE " + byeRequest);
                if (!sendSubsequentRequestsThroughSipProvider) {
                    dialog.sendRequest(ct);
                } else {
                    sipProvider.sendRequest(byeRequest);
                }
                byeSent = true;
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    };
    if (sendByeInNewThread) {
        th.start();
    } else {
        th.run();
    }
}
Also used : ClientTransaction(javax.sip.ClientTransaction) Request(javax.sip.message.Request) SipURI(javax.sip.address.SipURI) URI(javax.sip.address.URI) SipURI(javax.sip.address.SipURI) InvalidArgumentException(javax.sip.InvalidArgumentException) ParseException(java.text.ParseException) SipException(javax.sip.SipException) TransactionDoesNotExistException(javax.sip.TransactionDoesNotExistException) TransactionUnavailableException(javax.sip.TransactionUnavailableException)

Aggregations

SipURI (javax.sip.address.SipURI)70 ParseException (java.text.ParseException)27 Request (javax.sip.message.Request)24 Address (javax.sip.address.Address)22 InvalidArgumentException (javax.sip.InvalidArgumentException)20 ViaHeader (javax.sip.header.ViaHeader)20 SipException (javax.sip.SipException)19 ToHeader (javax.sip.header.ToHeader)18 ContactHeader (javax.sip.header.ContactHeader)17 FromHeader (javax.sip.header.FromHeader)17 Test (org.junit.Test)17 RouteHeader (javax.sip.header.RouteHeader)16 AppServer (org.mobicents.tools.sip.balancer.AppServer)16 EventListener (org.mobicents.tools.sip.balancer.EventListener)16 CSeqHeader (javax.sip.header.CSeqHeader)13 CallIdHeader (javax.sip.header.CallIdHeader)13 Header (javax.sip.header.Header)13 MaxForwardsHeader (javax.sip.header.MaxForwardsHeader)13 RecordRouteHeader (javax.sip.header.RecordRouteHeader)13 URI (javax.sip.address.URI)11