Actually, now that I see you're using iTunes (for the moment), I believe that the "Continuity" feature of iOS/Mac OS should automatically pause the music on the Mac when your phone rings, and then keep it paused as long as you're on the call, but this only works if you're using iTunes as the music server on the Mac, and you have Handoff / Continuity compatible hardware. (Which is most hardware having Bluetooth Low Energy chips, though note that you also need to have Bluetooth enabled on both your iPhone and Mac.)
I've looked at the Mira IR receivers in the past, and while I haven't needed to order one, they were very responsive to my questions. Worth considering if you want to re-investigate the IR remote route.