Remove Port Restriction When Checking For NAT

When trying to determine if a peer is behind NAT, we should not be using the
ports when comparing addresses.

This patch removes the port from being checked and just useds the addresses
now.

(closes issue ASTERISK-22729)
Reported by: Michael L. Young
Tested by: Michael L. Young
Patches:
    asterisk-remove-using-port-for-nat-check.diff
                                     uploaded by Michael L. Young (license 5026)

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

Merged revisions 401182 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 401183 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@401184 f38db490-d61c-443f-a65b-d21fe96a405b
Clarify in ast_bridge_destroy() about how departable channels must be handled.
........

Merged revisions 401212 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@401216 f38db490-d61c-443f-a65b-d21fe96a405b
Remove the bit about requiring ast_bridge_depart() to be called before ast_bridge_destroy().
........

Merged revisions 401223 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@401224 f38db490-d61c-443f-a65b-d21fe96a405b
Tweak ast_bridge_depart() doxygen.
........

Merged revisions 401232 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@401233 f38db490-d61c-443f-a65b-d21fe96a405b
Add channel lock protection around translation path setup.

Most callers of ast_channel_make_compatible() happen before the channels
enter a two party bridge.  With the new bridging framework, two party
bridging technologies may also call ast_channel_make_compatible() when
there is more than one thread involved with the two channels.

* Added channel lock protection in set_format() and
ast_channel_make_compatible_helper() when dealing with the channel's
native formats while setting up a translation path.

* Fixed best_src_fmt and best_dst_fmt usage consistency in
ast_channel_make_compatible_helper().  The call to
ast_translator_best_choice() got them backwards.

* Updated some callers of ast_channel_make_compatible() and the function
documentation.  There is actually a difference between the two channels
passed in.

* Fixed the deadlock potential in res_fax.c dealing with
ast_channel_make_compatible().  The deadlock potential was already there
anyway because res_fax called ast_channel_make_compatible() with chan
locked.

(closes issue ASTERISK-22542)
Reported by: Matt Jordan

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

Merged revisions 401239 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@401240 f38db490-d61c-443f-a65b-d21fe96a405b