Interface DialogActivity

    • Method Detail

      • sendRequest

        ClientTransaction sendRequest​(Request request)
                               throws SipException
        Convenience method to create a client transaction and send a request in one operation.
        Parameters:
        request - the Request to be sent on the dialog. This request should have been created using the dialog
        Returns:
        the new ClientTransaction that this request was sent out on. Note the ClientTransaction object is not an activity in the SLEE.
        Throws:
        SipException - if unable to create the client transaction or send the request.
      • createRequest

        Request createRequest​(Request origRequest)
                       throws SipException
        This method is used to create a Request that will be sent on this Dialog, where the original Request has been received on an incoming Dialog. This scenario is common for B2BUA applications.
        Parameters:
        origRequest - the original request received on another dialog.
        Returns:
        a new Request to be sent on the dialog. This will be a copy of the original request, with the correct dialog-specific headers for this dialog.
        Throws:
        SipException - if unable to create the request.
      • createResponse

        Response createResponse​(ServerTransaction origServerTransaction,
                                Response receivedResponse)
                         throws SipException
        This method is used to create a Response that is to be forwarded on this Dialog. This is typically performed when a B2BUA application receives a response from one Dialog and wishes to forward the response on another Dialog.

        This method is intended to be used in conjunction with the associateServerTransaction and getAssociatedServerTransaction methods, so that incoming responses can be easily matched with a ServerTransaction to forward them on.

        Parameters:
        origServerTransaction - the ServerTransaction on the dialog, on which the newly-created response will be sent on.
        receivedResponse - the Response received on another dialog.
        Returns:
        a new Response to be sent on the dialog. This will be a copy of the original response, with the correct dialog-specific headers for this dialog.
        Throws:
        SipException - if unable to create the response.
      • associateServerTransaction

        void associateServerTransaction​(ClientTransaction ct,
                                        ServerTransaction st)
        When forwarding requests between dialogs, as a B2BUA would do, it is necessary to create an association between the client transaction, which is forwarding the request, and the server transaction, on which the original request was received. This is so that when a response arrives on the client transaction, it can be forwarded upstream on the original server transaction.

        A B2BUA application should call this method when forwarding a request on a dialog, so that later when it needs to forward the response, it can easily get the original server transaction using getAssociatedServerTransaction(javax.sip.ClientTransaction), and pass this to createResponse(javax.sip.ServerTransaction, javax.sip.message.Response) so the response can be forwarded upstream.

        Parameters:
        ct - the ClientTransaction which is sending the forwarded request.
        st - the original ServerTransaction that received the request.
      • sendCancel

        ClientTransaction sendCancel()
                              throws SipException
        Create and send a CANCEL request for the last INVITE request that was sent on this dialog. This method may be used for cancelling initial INVITEs or re-INVITEs. This method does not directly affect the dialog state. The CANCEL should cause the downstream server to send a 487 response to the INVITE, which will automatically end the dialog if the INVITE was the initial request.
        Returns:
        A ClientTransaction activity object, representing the CANCEL's client transaction. The SBB may obtain the ActivityContextInterface for this activity and attach to it, if it is interested in the response to the CANCEL. Otherwise, this activity may be safely ignored.
        Throws:
        SipException - if there was no active INVITE client transaction to cancel, or if there was an error sending the CANCEL request.
      • getApplicationData

        Object getApplicationData()
        This method is disallowed in the JSIP 1.2 RA Type. SBBs must use CMP fields instead. Invoking this method will throw a SecurityException.
        Specified by:
        getApplicationData in interface Dialog
      • setApplicationData

        void setApplicationData​(Object object)
        This method is disallowed in the JSIP 1.2 RA Type. SBBs must use CMP fields instead. Invoking this method will throw a SecurityException.
        Specified by:
        setApplicationData in interface Dialog