Influence of bulk and surface phenomena on the hydrogen permeation through metals