Backport Appropiate NAT Setting Cleanup

In ASTERISK-20904, the focus was around the changes to NAT that took place in
Asterisk 11.  Since the report stated that 1.8 was fine, we didn't take a look
at 1.8 at the time.

While working on ASTERISK-21225, I could see that 1.8 would benefit from having
some of those changes applied to it.

This patch does the following:

* The important part of this patch is that it sets the peer's flags earlier in
  build_peer so that the code properly uses the peer's flags based on the peer's
  configuration.
* constify req parameter in check_via()
* update realtime schemas under the contrib directory to handle properly the NAT
  settings available in 1.8 as well as to handle the changes made in 11 to make
  upgrading easier when installing newer versions of Asterisk

(closes issue ASTERISK-21243)
Reported by: Michael L. Young
Patches:
    asterisk-20904-changes_for_1.8.diff Michael L. Young (license 5026)

Review: https://reviewboard.asterisk.org/r/2422/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@384779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Michael L. Young
2013-04-04 19:31:40 +00:00
parent 7bdeb23dd2
commit c5d2978944
3 changed files with 13 additions and 9 deletions

View File

@@ -48,7 +48,7 @@ insecure character varying(4),
"language" character varying(2),
mailbox character varying(50),
md5secret character varying(80),
nat character varying(5) DEFAULT 'no' NOT NULL,
nat character varying(29) DEFAULT '' NOT NULL,
permit character varying(95),
deny character varying(95),
mask character varying(95),