code: @Override
      public boolean canDetectHangup()
      {
          boolean canDetectHangup = true;
  
          AsteriskSettings profile = PBXFactory.getActiveProfile();
          final boolean detect = profile.getCanDetectHangup();
          if (!this.getEndPoint().isSIP() && !detect)
          {
              canDetectHangup = false;
          }
          return canDetectHangup;
      }
docs: /*
  Returns true if this channel can detect hangups A SIP channel can always
  detect a hangup if its not channel then we need to check the profile to
  see if hangup detection is available. Hangup detection is important as we
  don't want to connect two channels both of which can't do hangup
  detection. If this happened then we would end up with a call which would
  never hangup.