If direct media is configured, the system tries to negotiate direct media between the call ends. When SRTP is involved, addition to checking for matching VoIP criteria (for example matching codec support), the system also checks for matching Media Security and media security advanced settings (SRTP flags and crypto suites). Any incompatibility prohibits the call using direct media.
Calls between call legs set to different Media Security levels (Disabled, Best Effort or Enforced) will not use direct media.