本文整理了Java中javax.sip.Dialog.sendAck()
方法的一些代码示例,展示了Dialog.sendAck()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dialog.sendAck()
方法的具体详情如下:
包路径:javax.sip.Dialog
类名称:Dialog
方法名:sendAck
暂无
代码示例来源:origin: org.mobicents.examples/converged-demo-callcontrol-sbb
public void sendCallerAck(ResponseEvent event) {
try {
Dialog dialog = sipUtils.getDialog(event);
Request ackRequest = sipUtils.buildAck(dialog, null);
dialog.sendAck(ackRequest);
} catch (SipException e) {
e.printStackTrace();
}
}
代码示例来源:origin: org.mobicents.examples/restcomm-slee-example-sip11-b2b-sbb
public void on2xxResponse(ResponseEvent event, ActivityContextInterface aci) {
final CSeqHeader cseq = (CSeqHeader) event.getResponse().getHeader(
CSeqHeader.NAME);
if (cseq.getMethod().equals(Request.INVITE)) {
// lets ack it ourselves to avoid UAS retransmissions due to
// forwarding of this response and further UAC Ack
// note that the app does not handles UAC ACKs
try {
final Request ack = event.getDialog().createAck(
cseq.getSeqNumber());
event.getDialog().sendAck(ack);
} catch (Exception e) {
tracer.severe("Unable to ack INVITE's 200 ok from UAS", e);
}
} else if (cseq.getMethod().equals(Request.BYE)
|| cseq.getMethod().equals(Request.CANCEL)) {
// not forwarded to the other dialog
return;
}
processResponse(event, aci);
}
代码示例来源:origin: org.mobicents.examples/converged-demo-callcontrol-sbb
/**
* Accepts a response event and sends an ACK (containing the sdp from this
* event) to the callee.
*
* @param event
*/
private void sendCalleeAck(ResponseEvent event) {
log.debug("Sending Calee ACK event ResposneEvent = " + event);
try {
ClientTransaction ct = event.getClientTransaction();
final String callerCallId = ((CallIdHeader) ct.getRequest()
.getHeader(CallIdHeader.NAME)).getCallId();
Dialog calleeDialog = getPeerDialog(callerCallId);
Object content = event.getResponse().getContent();
log.debug("Building ACK content = " + content + " Dialog = "
+ calleeDialog);
Request ackRequest = sipUtils.buildAck(calleeDialog, content);
calleeDialog.sendAck(ackRequest);
} catch (SipException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
logger.debug("Sending the ACK request " + request);
session.getSessionCreatingDialog().sendAck(request);
session.setRequestsPending(session.getRequestsPending()-1);
sipFactoryImpl.getSipApplicationDispatcher().updateRequestsStatistics(request, false);
代码示例来源:origin: org.mobicents.examples/converged-demo-callcontrol-sbb
public void onConnectionCreated(MsConnectionEvent evt,
ActivityContextInterface aci) {
log.info("--------------onConnectionCreated--------------");
MsConnection connection = evt.getConnection();
log.info("Created RTP connection [" + connection.getEndpoint() + "]");
try {
Dialog dialog = sipUtils.getDialog(getResponseEventCmp());
Request ackRequest = sipUtils.buildAck(dialog, connection
.getLocalDescriptor());
dialog.sendAck(ackRequest);
} catch (SipException e) {
e.printStackTrace();
}
MsSession session = connection.getSession();
MsLink link = session.createLink(MsLinkMode.FULL_DUPLEX);
ActivityContextInterface linkActivity = null;
try {
linkActivity = mediaAcif.getActivityContextInterface(link);
} catch (UnrecognizedActivityException ex) {
ex.printStackTrace();
}
linkActivity.attach(getParentCmp());
link.join(connection.getEndpoint(), ANNOUNCEMENT_ENDPOINT);
}
代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl
logger.info("Sending the ACK through the dialog " + clonedRequest);
dialog.sendAck(clonedRequest);
} else {
Request dialogRequest=
内容来源于网络,如有侵权,请联系作者删除!