Let F/F-0 be a quadratic extension of nonarchimedean locally compact fields of residual characteristic p not equal 2 and let sigma denote its nontrivial automorphism. Let R be an algebraically closed field of characteristic different from p. To any cuspidal representation pi of GL(n)(F), with coefficients in R, such that pi(sigma) similar or equal to pi(boolean OR) (such a representation is said to be sigma-selfdual) we associate a quadratic extension D/D-0, where D is a tamely ramified extension of F and D-0 is a tamely ramified extension of F-0, together with a quadratic character of D-0(x). When pi is supercuspidal, we give a necessary and sufficient condition, in terms of these data, for pi to be GL(n)(F-0)-distinguished. When the characteristic l of R is not 2, denoting by omega the nontrivial R-character of F-0(x) trivial on F/F-0-norms, we prove that any sigma-selfdual supercuspidal R-representation is either distinguished or omega-distinguished, but not both. In the modular case, that is when l > 0, we give examples of sigma-selfdual cuspidal nonsupercuspidal representations which are not distinguished nor omega-distinguished. In the particular case where R is the field of complex numbers, in which case all cuspidal representations are supercuspidal, this gives a complete distinction criterion for arbitrary complex cuspidal representations, as well as a purely local proof, for cuspidal representations, of the dichotomy and disjunction theorem due to Kable and Anandavardhanan, Kable and Tandon, when p not equal 2.