On Tue, Nov 1, 2016 at 10:00 AM, Canuck . <[email protected]> wrote: > Has there been any discussions of adding an SDP mangler to Asterisk? One > possible application I can think of is allowing directmedia to peers that > are behind NAT. It's probably more difficult than just SDP mangling but that > is probably a good start. I am sure it would have other uses as well. > > Essentially, I am look for an equivalent to the SDP mangler available for > Kamailio without having to install Kamailio and integrate it with Asterisk > just for that feature. > > http://www.kamailio.org/docs/modules/4.1.x/modules/mangler.html > > For directmedia use, it would basically use the same values as > nat=force_rport, comedia does. So it would replace the SDP port and IP with > those values if it detects a private IP address. > > Before I start experimenting with the Kamailio module, am I on the right > track with this? How feasable is this as a new asterisk feature?
If your purpose is for providing address rewriting for purposes of NAT (on pre-mapped and opened port ranges) you can already do this in pjsip.conf on the transport object: [transport-udp-nat] type=transport protocol=udp bind=0.0.0.0 local_net=192.0.2.0/24 external_media_address=203.0.113.1 external_signaling_address=203.0.113.1 You only need to set your localnet to a proper internal value, and set your external_* addresses to whatever your public IP is set to. Hope that helps! -- Matthew Fredrickson Digium, Inc. | Engineering Manager 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
