// }
// }
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(MsLink.MODE_FULL_DUPLEX);
ActivityContextInterface linkActivity = null;
try {
linkActivity = mediaAcif.getActivityContextInterface(link);
} catch (UnrecognizedActivityException ex) {
ex.printStackTrace();
}
linkActivity.attach(getParentCmp());
link.join(connection.getEndpoint(), ANNOUNCEMENT_ENDPOINT);
}