Did Dr tell you what kind of ear infection did you have? Was it middle ear or external ear? Have you visited the Dr after stopping the treatment? Had you at any point your hearing checked?
My wild guess is that either you had an external otitis and the tissues around your ear, while not infected, must be still inflamed, so they're sensitive to pressure, or that your Dr missed the diagnosis and your problem wasn't the ear but the temporal-mandibular joint (TMJ) so as soon as you've started to use phones again, it aches. In any case and despite being myself an otolaryngologist, I wouldn't take my comment as something remotely close to the truth, so you'd better visit your ENT, and have your ears and hearing inspected.
Take care.