<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    <div class="moz-cite-prefix">On 12/11/15 15:08, Juha Heinanen wrote:<br>
    </div>
    <blockquote cite="mid:22084.40287.919438.559237@lohi.tutpro.com"
      type="cite">
      <pre wrap="">Daniel-Constantin Mierla writes:

</pre>
      <blockquote type="cite">
        <pre wrap="">I think still having the ability to parse is good, because it makes sure
that the sdp is valid and it is quite common that later it will be
parsed anyhow (e.g., for rtp proxying).
</pre>
      </blockquote>
      <pre wrap="">
based on my reading of rtpengine_offer/answer, they do not parse the
body and that is the whole point of this exercise.

-- juha

ps. while reading rtpengine_offer/answer code, i found this:

        if (!msg->content_type)
        {
                LM_WARN("the header Content-TYPE is absent!"
                        "let's assume the content is text/plain ;-)\n");
                return 1;
        }

my impression is that if content-type header is missing, the default is
application/sdp.
</pre>
    </blockquote>
    Haven't looked at rtpengine module, but rtpproxy module is using the
    sdp parser and that is still very common out there (including the
    default kamailio.cfg). I still see the need of a way to assert that
    sdp body is correct and I use it to be sure the entire invite is
    correct, along with checks from sanity module.<br>
    <br>
    Also, there is another function that checks the type of the body:<br>
    <br>
    <meta charset="utf-8">
    has_body("application/sdp")<br>
    <br>
    Not sure if that works for multi-part body.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Book: SIP Routing With Kamailio - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Kamailio Advanced Training, Nov 30-Dec 2, Berlin - <a class="moz-txt-link-freetext" href="http://asipto.com/kat">http://asipto.com/kat</a></pre>
  </body>
</html>