Solution (source code)

= Solution

The map $h(z)=e^{-iz}$ is a conformal equivalence from $E$ to the plane slit along the nonpositive real axis. Conjugating $\phi$ by $h$ gives an automorphism of the slit plane whose two prime ends at $0$ and $\infty$ are fixed. Taking the principal square root identifies the slit plane with the right half-plane; the automorphisms of a half-plane that fix $0$ and $\infty$ are precisely $w\mapsto aw$ with $a>0$. Undoing the square root changes only the positive scale, so
$$
e^{-i\phi(z)}=a e^{-iz}
$$
for some $a>0$. Since $E$ is connected and both sides use the same branch,
$$
\boxed{\phi(z)=z+i\log a}.
$$
\b[Thus $\phi$ is translation by a purely imaginary number.]