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

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

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

Dialog.sendAck介绍

暂无

代码示例

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

  1. public void sendCallerAck(ResponseEvent event) {
  2. try {
  3. Dialog dialog = sipUtils.getDialog(event);
  4. Request ackRequest = sipUtils.buildAck(dialog, null);
  5. dialog.sendAck(ackRequest);
  6. } catch (SipException e) {
  7. e.printStackTrace();
  8. }
  9. }

代码示例来源:origin: org.mobicents.examples/restcomm-slee-example-sip11-b2b-sbb

  1. public void on2xxResponse(ResponseEvent event, ActivityContextInterface aci) {
  2. final CSeqHeader cseq = (CSeqHeader) event.getResponse().getHeader(
  3. CSeqHeader.NAME);
  4. if (cseq.getMethod().equals(Request.INVITE)) {
  5. // lets ack it ourselves to avoid UAS retransmissions due to
  6. // forwarding of this response and further UAC Ack
  7. // note that the app does not handles UAC ACKs
  8. try {
  9. final Request ack = event.getDialog().createAck(
  10. cseq.getSeqNumber());
  11. event.getDialog().sendAck(ack);
  12. } catch (Exception e) {
  13. tracer.severe("Unable to ack INVITE's 200 ok from UAS", e);
  14. }
  15. } else if (cseq.getMethod().equals(Request.BYE)
  16. || cseq.getMethod().equals(Request.CANCEL)) {
  17. // not forwarded to the other dialog
  18. return;
  19. }
  20. processResponse(event, aci);
  21. }

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

  1. /**
  2. * Accepts a response event and sends an ACK (containing the sdp from this
  3. * event) to the callee.
  4. *
  5. * @param event
  6. */
  7. private void sendCalleeAck(ResponseEvent event) {
  8. log.debug("Sending Calee ACK event ResposneEvent = " + event);
  9. try {
  10. ClientTransaction ct = event.getClientTransaction();
  11. final String callerCallId = ((CallIdHeader) ct.getRequest()
  12. .getHeader(CallIdHeader.NAME)).getCallId();
  13. Dialog calleeDialog = getPeerDialog(callerCallId);
  14. Object content = event.getResponse().getContent();
  15. log.debug("Building ACK content = " + content + " Dialog = "
  16. + calleeDialog);
  17. Request ackRequest = sipUtils.buildAck(calleeDialog, content);
  18. calleeDialog.sendAck(ackRequest);
  19. } catch (SipException e) {
  20. // TODO Auto-generated catch block
  21. e.printStackTrace();
  22. }
  23. }

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

  1. logger.debug("Sending the ACK request " + request);
  2. session.getSessionCreatingDialog().sendAck(request);
  3. session.setRequestsPending(session.getRequestsPending()-1);
  4. sipFactoryImpl.getSipApplicationDispatcher().updateRequestsStatistics(request, false);

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

  1. public void onConnectionCreated(MsConnectionEvent evt,
  2. ActivityContextInterface aci) {
  3. log.info("--------------onConnectionCreated--------------");
  4. MsConnection connection = evt.getConnection();
  5. log.info("Created RTP connection [" + connection.getEndpoint() + "]");
  6. try {
  7. Dialog dialog = sipUtils.getDialog(getResponseEventCmp());
  8. Request ackRequest = sipUtils.buildAck(dialog, connection
  9. .getLocalDescriptor());
  10. dialog.sendAck(ackRequest);
  11. } catch (SipException e) {
  12. e.printStackTrace();
  13. }
  14. MsSession session = connection.getSession();
  15. MsLink link = session.createLink(MsLinkMode.FULL_DUPLEX);
  16. ActivityContextInterface linkActivity = null;
  17. try {
  18. linkActivity = mediaAcif.getActivityContextInterface(link);
  19. } catch (UnrecognizedActivityException ex) {
  20. ex.printStackTrace();
  21. }
  22. linkActivity.attach(getParentCmp());
  23. link.join(connection.getEndpoint(), ANNOUNCEMENT_ENDPOINT);
  24. }

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

  1. logger.info("Sending the ACK through the dialog " + clonedRequest);
  2. dialog.sendAck(clonedRequest);
  3. } else {
  4. Request dialogRequest=

相关文章