  We study the conditions for operation of the 22 GHz ortho-water maser in a
dusty medium near late-type stars. The main physical processes, such as
exchange of energy between dust and gas in the radiation field of a star,
radiative cooling by water molecules and pumping of water masers are described
self-consistently. We show that the presence of dust grains of various types
(or of one type with size distribution) strongly affects the maser action. The
pumping mechanism based on the presence of the dust of different optical
properties is able to explain water masers in the silicate carbon star V778
Cyg. However, the masers in the winds from asymptotic giant branch stars
require an additional source of heating, for instance due to the dust drift
through the gas.
