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(); } }
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); }
/** * 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(); } }
logger.debug("Sending the ACK request " + request); session.getSessionCreatingDialog().sendAck(request); session.setRequestsPending(session.getRequestsPending()-1); sipFactoryImpl.getSipApplicationDispatcher().updateRequestsStatistics(request, false);
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); }
logger.info("Sending the ACK through the dialog " + clonedRequest); dialog.sendAck(clonedRequest); } else { Request dialogRequest=