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

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

本文整理了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

  1. /**
  2. *
  3. * @param callId
  4. * @return
  5. */
  6. private Session getSession(Dialog dialog) {
  7. final String callId = dialog.getCallId().getCallId();
  8. SessionAssociation sa = (SessionAssociation) cache.get(callId);
  9. Session session = sa.getSession(callId);
  10. return session;
  11. }

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

  1. public void handleOK(String callerCallId, ResponseEvent event) {
  2. // Check that the dialog of the event is the same as in the session
  3. // If not this is the result of a fork, we don't handle this
  4. try {
  5. Dialog eventDialog = sipUtils.getDialog(event);
  6. Dialog currentDialog = getDialog(eventDialog.getCallId()
  7. .getCallId());
  8. if (!eventDialog.equals(currentDialog)) {
  9. log.warn("Received 200 response from forked dialog");
  10. return; // We don't currently handle this. Should send ACK
  11. // and BYE
  12. }
  13. } catch (SipException e) {
  14. // TODO Handle this
  15. }
  16. sendCalleeAck(event);
  17. sendCallerAck(event);
  18. setState(new SessionEstablishedState(), callerCallId);
  19. }

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

  1. public String getCallId() {
  2. if(this.sessionCreatingDialog != null)
  3. return this.sessionCreatingDialog.getCallId().getCallId();
  4. else if(sessionCreatingTransactionRequest != null)
  5. return ((CallIdHeader)this.sessionCreatingTransactionRequest.getMessage().getHeader(CallIdHeader.NAME)).getCallId();
  6. else if(key != null)
  7. return key.getCallId();
  8. else
  9. return null;
  10. }

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

  1. public void execute(ResponseEvent event) {
  2. Response response = event.getResponse();
  3. // We expect a 200 OK and send a bye to Caller
  4. // However, we should send BYE to the Caller whatever the response
  5. // is
  6. // so we simply ignore the response for now.
  7. final String callId = ((CallIdHeader) response
  8. .getHeader(CallIdHeader.NAME)).getCallId();
  9. Dialog dialog = getPeerDialog(callId);
  10. // TODO Handle exception better (exception indicated in termination
  11. // state)
  12. try {
  13. sendRequest(dialog, Request.BYE);
  14. setState(new ExternalTerminationCallerState(), callId);
  15. } catch (SipException e) {
  16. log
  17. .error("Exception while sending BYE in execute for callId : "
  18. + dialog.getCallId().getCallId());
  19. setState(new TerminationState(), callId);
  20. }
  21. }
  22. }

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

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

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

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

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

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

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

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

相关文章