コード例 #1
0
 /**
  * @see
  *     com.fjl.test.tools.sip.call.state.SipDialogState#handleAck(com.fjl.test.tools.sip.call.SipDialog,
  *     javax.sip.RequestEvent, com.fjl.test.tools.sip.SipEventListener)
  */
 @Override
 public void handleAck(
     SipDialog sipDialog, RequestEvent requestEvent, SipEventListener sipEventListener)
     throws SipClientStackException {
   logger.trace("ReInvitedState.handleAck");
   sipDialog.setSipDialogState(DialogState.IN_CALL);
   sipEventListener.handleAck(sipDialog.getCallId(), requestEvent);
 }
コード例 #2
0
 /**
  * @see
  *     com.fjl.test.tools.sip.call.state.SipDialogState#sendCancelSuccessResponse(com.fjl.test.tools.sip.call.SipDialog,
  *     javax.sip.ServerTransaction, int, java.util.Vector)
  */
 @Override
 public void sendCancelSuccessResponse(
     SipDialog sipDialog,
     ServerTransaction serverTransaction,
     int statusCode,
     Vector<SipHeader> headers)
     throws SipClientStackException {
   logger.trace("ReInvitedState.sendCancelSuccessResponse");
   sipDialog.createAndSendResponse(serverTransaction, statusCode, null, headers);
   sipDialog.setSipDialogState(DialogState.REINVITED);
 }
コード例 #3
0
 /**
  * @see
  *     com.fjl.test.tools.sip.call.state.SipDialogState#sendInviteProvisionalResponse(com.fjl.test.tools.sip.call.SipDialog,
  *     javax.sip.ServerTransaction, int, com.fjl.test.tools.sip.call.content.Content,
  *     java.util.Vector)
  */
 @Override
 public void sendInviteProvisionalResponse(
     SipDialog sipDialog,
     ServerTransaction serverTransaction,
     int statusCode,
     Content content,
     Vector<SipHeader> headers)
     throws SipClientStackException {
   logger.trace("ReInvitedState.sendInviteProvisionalResponse");
   sipDialog.createAndSendResponse(serverTransaction, statusCode, content, headers);
   sipDialog.setSipDialogState(DialogState.REINVITED);
 }
コード例 #4
0
  /**
   * @see
   *     com.fjl.test.tools.sip.call.state.SipDialogState#handleInviteErrorResponse(com.fjl.test.tools.sip.call.SipDialog,
   *     javax.sip.ResponseEvent, com.fjl.test.tools.sip.SipEventListener)
   */
  @Override
  public void handleInviteErrorResponse(
      SipDialog sipDialog, ResponseEvent responseEvent, SipEventListener sipEventListener)
      throws SipClientStackException {
    logger.trace("ReInvitedState.handleInviteErrorResponse");
    boolean isDialogToBeClosed =
        SipTools.isErrorCodeCloseDialog(responseEvent.getResponse().getStatusCode());
    if (isDialogToBeClosed) {
      sipDialog.setSipDialogState(DialogState.CLOSED);
    } else {
      // remains in same state
    }

    sipEventListener.handleInviteErrorResponse(sipDialog.getCallId(), responseEvent);
  }
コード例 #5
0
 /**
  * @see
  *     com.fjl.test.tools.sip.call.state.SipDialogState#sendInviteErrorResponse(com.fjl.test.tools.sip.call.SipDialog,
  *     javax.sip.ServerTransaction, int, java.util.Vector)
  */
 @Override
 public void sendInviteErrorResponse(
     SipDialog sipDialog,
     ServerTransaction serverTransaction,
     int statusCode,
     Vector<SipHeader> headers)
     throws SipClientStackException {
   logger.trace("ReInvitedState.sendInviteErrorResponse");
   sipDialog.createAndSendResponse(serverTransaction, statusCode, null, headers);
   boolean toBeClosed = SipTools.isErrorCodeCloseDialog(statusCode);
   if (toBeClosed) {
     sipDialog.setSipDialogState(DialogState.CLOSED);
   } else {
     sipDialog.setSipDialogState(DialogState.IN_CALL);
   }
 }
コード例 #6
0
 /**
  * @see
  *     com.fjl.test.tools.sip.call.state.SipDialogState#sendInvite(com.fjl.test.tools.sip.call.SipDialog,
  *     java.lang.String, com.fjl.test.tools.sip.call.content.Content, java.util.Vector)
  */
 @Override
 public void sendInvite(
     SipDialog sipDialog,
     String toSipUri,
     Content content,
     Vector<SipHeader> headers,
     boolean authenticated)
     throws SipClientStackException {
   logger.trace("ReInvitedState.sendInvite");
   sipDialog.createAndSendReInvite(content, headers);
   // sipDialog.setSipDialogState( DialogState.REINVITING);
 }
コード例 #7
0
 /**
  * Send a Bye message
  *
  * @param sipDialog specifies the SipDialog
  * @param headers specifies the headers to be added in the BYE.
  * @return the Call-ID created
  * @throws SipClientStackException In case of error.
  */
 public void sendBye(SipDialog sipDialog, Vector<SipHeader> headers)
     throws SipClientStackException {
   sipDialog.createAndSendRequest(SipConstants.BYE, null, headers);
   sipDialog.setSipDialogState(DialogState.CLOSING);
 }