Yes, the pins have to match, but pin 1 male may have a purple wire connected to it and female 1 may have a yellow wire. There's no standard. The best way to do it is to cut off the end of the female and the male, then strip back the insulation on all wires on the male and female, and use a meter to check continuity and label the wires somehow. It's a long process, but the best way I know to ensure you have the right connection. Let's say you hook the purple pin 1 male wire which is connected to pin 1 up to button 1. Now the purple wire on the female side may be connected to pin 17, and if you hook that up to your IPAC on button 1 it won't work correctly, because it's looking for whatever is coming into pin 17. It's hard to put this in words, but I hope you understand.