code: @SuppressWarnings("unused")
       private static void fix(final Connection connection, final String externalIp) throws UnknownHostException, SdpException {
           if (connection != null) {
               if (Connection.IN.equals(connection.getNetworkType())) {
                   if (Connection.IP4.equals(connection.getAddressType())) {
                       final InetAddress address = DNSUtils.getByName(connection.getAddress());
                       if (address.isSiteLocalAddress() || address.isAnyLocalAddress() || address.isLoopbackAddress()) {
                           final String ip = address.getHostAddress();
                           connection.setAddress(externalIp);
                       }
                   }
               }
           }
       }
docs: Issue 308: https://telestax.atlassian.net/browse/RESTCOMM-308