In this work we consider a semi-linear energy critical wave equation in R d (3 ≤ d ≤ 5)Here the function φ ∈ C(R d ; (0, 1]) converges to zero as |x| → ∞. We follow the same compactness-rigidity argument as Kenig and Merle applied in their paper [32] on the Cauchy problem of the equationu and obtain a similar result when φ satisfies some technical conditions. In the defocusing case we prove that the solution scatters for any initial data in the energy spaceḢ 1 × L 2 . While in the focusing case we can determine the global behaviour of the solutions, either scattering or finite-time blow-up, according to their initial data when the energy is smaller than a certain threshold.By the Sobolev embeddingḢ 1 (R d ) ֒→ L 2 * (R d ), the energy E φ (u 0 , u 1 ) is finite for any initial data (u 0 , u 1 ) ∈Ḣ 1 × L 2 (R d ).