The invention relates to compounds of formula Ihaving pharmacological activity towards the sigma receptor, to processes of preparation of such compounds, to pharmaceutical compositions comprising them, and to their use for the treatment and or prophylaxis of a disease in which the sigma receptor is involved.