
767 P.2d 441 (1989)
307 Or. 323
Charles M. KEENAN, Petitioner On Review,
v.
R.S. PETERSON, Superintendent, Oregon State Correctional Inst., Respondent On Review.
No. TC 87-C-11214; CA A46668; SC S35733.
Supreme Court of Oregon, In Banc[*].
January 18, 1989.
Reconsideration Denied March 7, 1989.
*442 Steven H. Gorham, Salem, filed the petition on behalf of the petitioner on Review.
No appearance contra.
PER CURIAM.
Petitioner in this habeas corpus case is incarcerated in the Oregon State Correctional Institute (OSCI). He seeks review of a decision of the Court of Appeals holding that his right to confidential communication with his attorney is not interfered with by the practice at OSCI of randomly monitoring telephone calls to assure that such calls are not being used for an illegal purpose. Keenan v. Peterson, 92 Or. App. 703, 759 P.2d 1140 (1988) (per curiam). (The practice, according to the evidence as apparently accepted in the findings of the trial court, is to discontinue immediately any monitoring of a call that is between a prisoner and his attorney as soon as the nature of the call is apparent.) We allow the petition, vacate the decision of the Court of Appeals and remand to the trial court with instructions to dismiss the writ.
Beyond its traditional use as the method of determining if a person was being held unlawfully, habeas corpus is also available in Oregon in two kinds of cases:
"(1) When a petition makes allegations which, if true, show that the prisoner, though validly in custody, is subject to a further `imprisonment or restraint' of his person that would be unlawful if not justified to the court, and (2) when a petition alleges other deprivations of a prisoner's legal rights of a kind which, if true, would require immediate judicial scrutiny, if it also appears to the court that no other timely remedy is available to the prisoner."
Penrod/Brown v. Cupp, 283 Or. 21, 28, 581 P.2d 934 (1978). The petition here alleges neither kind of harm. An injunction proceeding, an action for declaratory judgment or a mandamus proceeding all would be sufficiently timely to adjudicate petitioner's claims. See Gage v. Maass, 306 Or. 196, 204, 759 P.2d 1049 (1988). The trial court should have dismissed the writ without reaching the merits.
The petition for review is allowed. The decision of the Court of Appeals is vacated. The case is remanded to the trial court with instructions to dismiss the writ.
NOTES
[*]  Van Hoomissen and Fadeley, JJ., did not participate in the decision of this case.
