Assume that an insurance company pays dividends to its shareholders whenever the surplus process is above a given threshold. In this paper we study the expected amount of dividends paid, and the expected time to ruin in the compound Poisson risk process perturbed by a Brownian motion. Two models are considered: In the first one the insurance company pays whatever amount exceeds a given level b as dividends to its shareholders. In the second model, the company starts to pay dividends at a given rate, smaller than the premium rate, whenever the surplus up-crosses the level b. The dividends are paid until the surplus down-crosses the level a, a < b . We assume that the claim sizes are phase-type distributed. In the analysis we apply the multidimensional Wald martingale, and the multidimensional Asmussesn and Kella martingale.