javax.sip.Dialog.getCallId()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(91)

本文整理了Java中javax.sip.Dialog.getCallId()方法的一些代码示例,展示了Dialog.getCallId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dialog.getCallId()方法的具体详情如下:
包路径:javax.sip.Dialog
类名称:Dialog
方法名:getCallId

Dialog.getCallId介绍

暂无

代码示例

代码示例来源:origin: org.mobicents.examples/converged-demo-callcontrol-sbb

/**
 * 
 * @param callId
 * @return
 */
private Session getSession(Dialog dialog) {
  final String callId = dialog.getCallId().getCallId();
  SessionAssociation sa = (SessionAssociation) cache.get(callId);
  Session session = sa.getSession(callId);
  return session;
}

代码示例来源:origin: org.mobicents.examples/converged-demo-callcontrol-sbb

public void handleOK(String callerCallId, ResponseEvent event) {
  // Check that the dialog of the event is the same as in the session
  // If not this is the result of a fork, we don't handle this
  try {
    Dialog eventDialog = sipUtils.getDialog(event);
    Dialog currentDialog = getDialog(eventDialog.getCallId()
        .getCallId());
    if (!eventDialog.equals(currentDialog)) {
      log.warn("Received 200 response from forked dialog");
      return; // We don't currently handle this. Should send ACK
      // and BYE
    }
  } catch (SipException e) {
    // TODO Handle this
  }
  sendCalleeAck(event);
  sendCallerAck(event);
  setState(new SessionEstablishedState(), callerCallId);
}

代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl

public String getCallId() {
  if(this.sessionCreatingDialog != null)
    return this.sessionCreatingDialog.getCallId().getCallId();
  else if(sessionCreatingTransactionRequest != null)
    return ((CallIdHeader)this.sessionCreatingTransactionRequest.getMessage().getHeader(CallIdHeader.NAME)).getCallId();
  else if(key != null) 
    return key.getCallId();
  else
    return null;
}

代码示例来源:origin: org.mobicents.examples/converged-demo-callcontrol-sbb

public void execute(ResponseEvent event) {
    Response response = event.getResponse();
    // We expect a 200 OK and send a bye to Caller
    // However, we should send BYE to the Caller whatever the response
    // is
    // so we simply ignore the response for now.
    final String callId = ((CallIdHeader) response
        .getHeader(CallIdHeader.NAME)).getCallId();
    Dialog dialog = getPeerDialog(callId);
    // TODO Handle exception better (exception indicated in termination
    // state)
    try {
      sendRequest(dialog, Request.BYE);
      setState(new ExternalTerminationCallerState(), callId);
    } catch (SipException e) {
      log
          .error("Exception while sending BYE in execute for callId : "
              + dialog.getCallId().getCallId());
      setState(new TerminationState(), callId);
    }
  }
}

代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl

.next();
MobicentsSipSessionKey sessionKey = mobicentsSipSession.getKey();                
if(sessionKey.getCallId().trim().equals(dialog.getCallId().getCallId())) {
  if(logger.isDebugEnabled()) {
    logger.debug("found session with the same Call Id " + sessionKey + ", to Tag " + sessionKey.getToTag());

代码示例来源:origin: org.mobicents.examples/converged-demo-callcontrol-sbb

currentDialog = getDialog(eventDialog.getCallId().getCallId());
if (!eventDialog.equals(currentDialog)) {
  log.warn("Received 200 response from forked dialog");

代码示例来源:origin: org.mobicents.examples/converged-demo-orderdeliverdate-sbb

logger
    .debug("Obtained dialog in onThirdPCCTriggerEvent : callId = "
        + dialog.getCallId().getCallId());

代码示例来源:origin: org.mobicents.examples/converged-demo-callcontrol-sbb

final String callId = dialog.getCallId().getCallId();

相关文章