MrDjToto MrDjToto - 5 months ago 72
Java Question

Sip Servlet get SDP content

I need to extrapolate the SDP from a SIP message in a SIP application.
I've tried to do something like:

protected void doInvite(SipServletRequest req) throws ServletException, IOException {
String = req.getContent().toString();

But it doesn't return me the SDP.
Some advices to solve the problem? Thank you!


This usually depends on the Content-Type header but given this is an INVITE I'm assuming the Content-Type is application/sdp. If that's the case, did you try the following ?

String sdp = new String(req.getContent())