We study the classical dynamics of an axion field (the signal) that is coupling into a Josephson junction (the detector) by means of a capacitive coupling of arbitrary size. Depending on the size of the coupling constant and the initial conditions, we find a rich phase space structure of this nonlinear problem. We present general analytic solutions of the equations of motion in the limit of small amplitudes of the angle variables, and discuss both the case of no dissipation and the case of dissipation in the system. The effect of a magnetic field is investigated as well, leading to topological phase transitions in the phase space structure.