[asterisk-dev] [Code Review]: Change the default nat setting to "yes"

Terry Wilson reviewboard at asterisk.org
Mon Nov 21 11:55:19 CST 2011



> On Nov. 21, 2011, 2:05 a.m., wdoekes wrote:
> > /branches/1.4/channels/chan_sip.c, line 18226
> > <https://reviewboard.asterisk.org/r/1591/diff/1/?file=21808#file21808line18226>
> >
> >     s/existant/existent/

Fixed.


> On Nov. 21, 2011, 2:05 a.m., wdoekes wrote:
> > /branches/1.4/configs/sip.conf.sample, lines 357-358
> > <https://reviewboard.asterisk.org/r/1591/diff/1/?file=21809#file21809line357>
> >
> >     I thought default was to have:
> >     
> >     ;option=value_that_is_not_default
> >     
> >     (sip.conf starts out that way with ;allowguest=no, ;match_auth_username=yes, ;allowtransfer=no)
> >     
> >     But later on it seems to be random, so flipping this to yes would be ok. (Unless someone has made a general rule of what would be recommended in the future.)

I don't think there is a general rule. Like you said, I saw both. I saw this as gently encouraging nat=yes--someone has to do more than uncomment something to switch it. I don't really care much either way, though.


> On Nov. 21, 2011, 2:05 a.m., wdoekes wrote:
> > /branches/1.4/channels/chan_sip.c, line 18224
> > <https://reviewboard.asterisk.org/r/1591/diff/1/?file=21808#file21808line18224>
> >
> >     This is called every time build_peer is called, right? That would get very old very quickly if you're using realtime.

Yes, it will. I suppose I can move the check and warning to reload_config to the loop that calls build_user/build_peer. This would keep the warning from printing twice for type=friend as well. I could also then just do the warning at startup and not every reload as well.


- Terry


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1591/#review4823
-----------------------------------------------------------


On Nov. 18, 2011, 10:50 a.m., Terry Wilson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1591/
> -----------------------------------------------------------
> 
> (Updated Nov. 18, 2011, 10:50 a.m.)
> 
> 
> Review request for Asterisk Developers and Kevin Fleming.
> 
> 
> Summary
> -------
> 
> Change the default to nat=yes, update CHANGES explaining the change, remove nat= from example peers, and add a big warning about having different nat= settings in [general] and peer configs.
> 
> 
> This addresses bug ASTERISK-18862.
>     https://issues.asterisk.org/jira/browse/ASTERISK-18862
> 
> 
> Diffs
> -----
> 
>   /branches/1.4/configs/sip.conf.sample 345544 
>   /branches/1.4/channels/chan_sip.c 345544 
>   /branches/1.4/CHANGES 345544 
> 
> Diff: https://reviewboard.asterisk.org/r/1591/diff
> 
> 
> Testing
> -------
> 
> Created users of various nat flavors and verified that the default was changed and that 'sip show peer' reported that nat was set as it should be.
> 
> 
> Thanks,
> 
> Terry
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20111121/557301b4/attachment-0001.htm>


More information about the asterisk-dev mailing list