Teaching philosophy with a PhD in math
The basis for teaching university-level courses is publication, not so much the courses you may have taken. Therefore, in order to teach a PHY-xxx course, you should expect to be required to have published some research that is relevant for philosophy. That may be in the philosophy of logic, preferably in a philosophy journal.

How close your research has to be close to philosophy will be entirely dependent on the philosophy department and program as well as who their staff are. If they do not have a logic specialist they may be more open to consider you, but be assured that you have to give them reason to prefer you over one of their instructors (professor or lecturer). By allowing you to teach a PHI course the department clearly takes a risk (you are not "one of them"), a risk that is perceived to be higher than letting a philosophy professor teach a logic course, even if it is not that professor's main field.

Indeed, departments tend to take as granted that their professors are implicitly qualified to teach any of their courses (even though that may obviously not be the case), while being a priori suspicious of professors from other departments. 

It may therefore be easier for you to give a course on a topic you hage to learn from scratch in mathematics than a course for which you think you are perfectly qualified in philosophy.

In any case, you should not go to the PHI department and argue that you have taken PHI courses which supposedly qualify you to compete with their professors who, after all, have a PhD in Philosophy. Write a couple of articles, a book, that is the way to do it. Or, offer to teach the course jointly with a PHI professor and see how it goes from there. Who knows, the other prof may take a sabbatical and hand you the course!