[OpenSIPS-Users] Getting the $rb or media port for egress message.

Pavel Eremin eremina.net at gmail.com
Wed Mar 27 06:56:03 UTC 2024


Hi, if I understand correctly, you have to get $rb from onreply_route.

ср, 27 мар. 2024 г. в 02:19, Matthew Schumacher <schu at schu.net>:
>
> Hello,
>
> I'm trying to log the media port for another system and using this code
> to grab the m line out of an SDP header:
>
>    if (has_body("application/sdp")){
>      rtpengine_offer();
>      $var(mline) = $(rb{sdp.line,m,0});
>      xlog("TEST $var(mline)\n");
>    }
>
> The problem is that it only sees the ports for ingress SDP messages and
> not egress SDP messages.  What can I do to grab the SDP messages leaving
> opensips?
>
> I want to take this data and inject a firewall rule that allows the
> media and remove it later because NAT helpers don't work on TLS traffic,
> my system already knows what port to expect, and I don't like having a
> huge pile of UDP ports allowed through.
>
> Honestly, I'm not sure why the kernel mode forwarding in rtpengine
> doesn't also allow traffic based on ports we are expecting to see
> traffic from.... that's what I thought it did at first until I realized
> that it's only forwarding the RTP packet through the kernel faster
> without needing userspace.
>
> Thanks,
> Matt
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



More information about the Users mailing list