[Kamailio-Users] NAThelper and multipart SDP

Pascal Maugeri pascal.maugeri at gmail.com
Fri Jun 19 20:49:50 CEST 2009


Hi

there are two separate issues here related to multipart/mixed.
>
> one is nathelper/mediaproxy module related and the other relates to
> textops/filter_body function.
>
> mediaproxy module's use_mediaproxy() function can extract application/sdp
> bodypart both in k 1.5 and sr.
>

ok, this point is clear. I'm sorry but I'm not so familiar with NAT support
in kamailio and there are three modules (NATHelper, Mediaproxy and
NAT_traversal, ...) that apparently do similar things. I will carrefully
read these module docs.

textops/filter_body function is able to leave out all other bodyparts
> except the one given as argument, but boundary string is properly
> extracted from Content-type param only in sr.
>

So if I understand well (please correct me if I'm wrong) the "plan" is:

1º) I install MediaProxy and use Kamailio MEDIAPROXY module instead of
rtpproxy/NATHelper

2º) filter the app/sdp part with

if (has_body("multipart/mixed")) {
    if (filter_body("application/sdp") {
        remove_hf("Content-Type");

        append_hf("Content-Type: application/sdp\r\n");
    } else {

        xlog("Body part application/sdp not found\n");
    }
}

     As the multipart boundary seems to be hardcoded with "--Boundary" in
Kamailio Mediaproxy module, I will make sure my client is using this one.

3º) then engage the media proxy with

if (method==INVITE && !has_totag()) {

    # We can also use a specific media relay if we need to
    #$avp(s:media_relay) = "1.2.3.4";
    engage_media_proxy();
}

4º) finally put the body part(s) that have been removed in 1º) and relay the
INVITE to my next hop.
     I believe I can save the body part(s) in 1º) and put them back using
set_body(txt, content_type).

Do you believe that this should work ?

-pascal


>
> -- juha
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/users/attachments/20090619/c006c21b/attachment.htm>


More information about the Users mailing list