When I plug in earphones into my HTC Desire S, it dials the phone
HTC Desire HD Android 2.3.5

I had exactly the same problem, would plug in standard headphones/ earphones/ aux cable to speakers... all of these would register on the phone as earphones with a mic built in for some reason.  it would cut music tracks short and play the next one or start ringing a call. 

strangely, as i was searching for this thread, the problem has self corrected.  All that is different is that I updated ALL of my apps on google app store today.  This is the only factor that I have changed.  Try this!  I hope it works out for you as well as I know how frustrating it was!

best wishes