1. Asterisk
  2. ASTERISK-27106

[patch] autodomain (SIP Domain Support): Add only really different domain with TLS.



      ASTERISK-4352 (Mantis 4466, Commit 9bbf4c3) allows to filter the incoming SIP messages in the channel driver chan_sip. This filter is enabled via the configuration file sip.conf and its parameter allowexternaldomains=no. The list itself is configured statically via the parameter domain= and/or automatically via autodomain=yes. Even without enabling this list, SIP-REGISTER messages go through this list, when at least one domain is specified, see the command-line interface (CLI): sip show domains. Furthermore, the dialplan function CHECKSIPDOMAIN works on this list, which allows as a guard in SIP-URI dialing, for example.

      With the addition of TCP, TLS, and IPv6, the original code was changed, which introduced minor errors:

      Steps to Reproduce
      tcpbindaddr=:: (same happens without tcpbindaddr, because it defaults to bindaddr then)
      autodomain=yes (not related actually, just to create a complete example)

      Actual Results
      <IPv4 of internip>
      <IPv4 of>

      The wildcard IP was added, which was not intended by the authors of that source code. However, subsequent code does not match any domain, therefore, this is rather cosmetic. Anyway, a bug is a bug and should be fixed.

      This was caused by:

      • Commit 638234f added TCP/TLS and intended to check whether the domain for UDP was different. That check was the wrong way around and therefore the TCP (or the TLS) domain was added in any case.
      • ASTERISK-16300 (Mantis 17565, Commit cd4ebd3) added IPv6 in general but did not add IPv6 for autodomain. Instead, it introduced a copy-and-paste error with the TLS hostname.

      In ASTERISK-16543 from August 2010, Olle Johansson mentioned to add IPv6, which was not done, yet. In ASTERISK-17886 from May 2011, aeg mentions to add ports, which was not done, yet. Furthermore, if externhost was set in sip.conf, it is added as domain – however its externaddr is not refreshed.

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.


        There are no comments yet on this issue.


          • Assignee:
            Alexander Traud
            Issue Participants:
          • Votes:
            0 Vote for this issue
            2 Start watching this issue


            • Created: