[asterisk-dev] [Code Review]: Add a SIP nat=auto setting

Terry Wilson twilson at digium.com
Wed Feb 8 10:43:03 CST 2012


> We ran into this with the 'insecure' setting, and the
> 'nat' setting (it's why 'force_rport' and 'comedia' are now separate,
> but combinable, options).

None of the nat settings are combinable in the config file, however (you can't do nat=force_rport,comedia for instance). If you want the combined version you have to select nat=yes. It is all very confusing. In a perfect developer world we would have just have combinable flags for force_rport, comedia. From a user perspective having a setting that "just works for 99% of the situations" would probably be ideal. nat=auto_force_rport,auto_force_comedia is kind of ugly. Also, if your are combining values, someone is bound to do something silly like nat=force_rport,auto_force_rport or something.

If we continue to not do combinable options, then we would have:

nat=no
nat=force_rport
nat=comedia
nat=yes
nat=auto_force_rport
nat=auto_force_comedia
nat=auto ; to be consistent with the nat=yes for combining the non-auto options

This doesn't seem too bad to me, to be honest. It seems cleaner than trying to combine auto and non-auto flags. No matter what we do, people will really need to read the docs to know what each value means--but only if we choose a default that doesn't work for them. :-)

Terry



More information about the asterisk-dev mailing list