  In this paper we will investigate the solutions and stability of the
generalized variant of Wilson's functional equation $$ (E):\;\;\;\;
f(xy)+\chi(y)f(\sigma(y)x)=2f(x)g(y),\; x,y\in G,$$ where $G$ is a group,
$\sigma$ is an involutive morphism of $G$ and $\chi$ is a character of $G$. (a)
We solve $(E)$ when $\sigma$ is an involutive automorphism, and we obtain some
properties about solutions of $(E)$ when $\sigma$ is an involutive
anti-automorphism. (b) We obtain the Hyers Ulam stability of equation $(E)$. As
an application, we prove the superstability of the functional equation
$f(xy)+\chi(y)f(\sigma(y)x)=2f(x)f(y),\; x,y\in G.$
