Asterisk
  1. Asterisk
  2. ASTERISK-27106

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

    Details

      Description

      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
      udpbindaddr=::
      tcpbindaddr=:: (same happens without tcpbindaddr, because it defaults to bindaddr then)
      tcpenable=yes
      autodomain=yes
      externhost=example.com (not related actually, just to create a complete example)

      Actual Results
      <IPv4 of internip>
      ::
      <IPv4 of example.com>
      example.com
      hostname

      Notes
      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.

        Activity

        There are no comments yet on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development