On Wed, Nov 2, 2016 at 3:07 PM, Canuck . <[email protected]> wrote: > Thank you for the response. If I understand that correctly it would be > for Asterisk behind NAT. My scenario is the other way around. > Asterisk on public IP and extension(s) behind NAT.
You are correct - I was assuming you were talking about Asterisk being behind a NAT. If you have two endpoints that are behind nat and you're not using symmetric RTP, PJSIP should try to preserve the transport addresses declared in SDP from each endpoint (so keep using private IP addresses). If you do have symmetric RTP enabled, it should use the publicly perceived address/port from the NAT firewall. Matthew Fredrickson > On 2016-11-02 7:27 AM, Matt Fredrickson wrote: >> 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! >> > > > -- > _____________________________________________________________________ > -- 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 -- 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
