  We introduce crossed products of a $C^*$-algebra $A$ by a completely positive
map $\varrho:A\to A$ relative to an ideal in $A$. They generalize various
crossed products by endomorphisms when $\varrho$ is multiplicative. When $A$ is
commutative they include $C^*$-algebras associated to Markov operators by
Ionescu, Muhly, Vega, and to topological relations by Brenken, but in general
they are not modeled by topological quivers popularized by Muhly and Tomforde.
  We show that Exel's crossed product $A\rtimes_{\alpha,L} \mathbb{N}$,
generalized to the case where $A$ is not necessarily unital, is the crossed
product of $A$ by the transfer operator $L$ relative to the ideal generated by
$\alpha(A)$. We give natural conditions under which $\alpha(A)$ is uniquely
determined by $L$, and hence $A\rtimes_{\alpha,L} \mathbb{N}$ depends only on
$L$. Moreover, the $C^*$-algebra $\mathcal{O}(A,\alpha,L)$ associated to
$(A,\alpha,L)$ by Exel and Royer always coincides with our unrelative crossed
product by $L$.
  As another non-trivial application of our construction we extend a result of
Brownlowe, Raeburn and Vittadello, by showing that the $C^*$-algebra of an
arbitrary infinite graph $E$ can be realized as a crossed product of the
diagonal algebra $\mathcal{D}_E$ by a `Perron-Frobenious' operator $L$. The
important difference is that in general there is no endomorphism $\alpha$ of
$\mathcal{D}_E$ making $(\mathcal{D}_E,\alpha,L)$ an Exel system.
