But it doesn't return me the SDP. Some advices to solve the problem?
Try the following to get SDP, I am using it to pack SDP in session_progress, in the doInvite method:
@Override
protected void doInvite(SipServletRequest request) throws ServletException, IOException {
byte[] sdpOffer = request.getRawContent();
try {
SipServletResponse response = request.createResponse(SipServletResponse.SC_SESSION_PROGRESS);
response.setContent(sdpOffer, "application/sdp");
response.send();
logger.info("SESSION_PROGRESS sent");
} catch (Exception exp) {
logger.error("exception in sending SP", exp);
}
}
Note: the code is not complete, you need to do other things as well when you are replying with Session_Progress