[asterisk-dev] Symmetric RTP behaviour and 'nat' peer option.

Joshua Colp jcolp at digium.com
Wed Apr 22 18:32:10 CDT 2009


----- "Alex Balashov" <abalashov at evaristesys.com> wrote:

> I agree that this patch is germane, but I think it is a little 
> orthogonal to the problem I have.    Maybe it's just a philosophical 
> difference.
> 
> Specifically, I do not *want* Asterisk to always retrain its outbound
> 
> RTP destination ports on the source port of the incoming RTP.  This is
> 
> what the patch appears to effect.  I don't think that should be the 
> behaviour.  If I set nat=no, I don't want Asterisk to do anything 
> "intelligent" like that.  I want it to behave strictly according to 
> protocol mechanics and send the RTP to where the SDP says to send the
> 
> RTP to.  If I set nat=yes, then it can do that.
> 

I just did some testing using the latest 1.4 from SVN and 1.4.21.1 for this specific situation.

To confirm whether the symmetric RTP support is being used or not I added a line of code that outputs a log message to the screen when it is executed.

1. Set nat to no in the general section, left unconfigured elsewhere. Confirmed that the code is not executed.
2. Set nat to yes in the general section, left unconfigured elsewhere. Confirmed that code is executed.
3. Set nat to no in the general section, set to yes in the phone entry. Confirmed that code is executed.
4. Set nat to no in the general section, set to no in the phone entry. Confirmed that code is not executed.
5. Set nat to yes in the general section, set to no in the phone entry. Confirmed that code is not executed.
6. Set nat to yes in the general section, set to yes in the phone entry. Confirmed that code is executed.
7. Set nat to no in the general section, disabled phone entry. Confirmed that code is not executed.
8. Set nat to yes in the general section, disabled phone entry. Confirmed that code is executed.

I've thrown all the scenarios I can think of at it and they all behave as expected. Are you doing something differently?

-- 
Joshua Colp
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org



More information about the asterisk-dev mailing list