I was reading up on fax machines and asterisk, I found out that fax machines and modems don’t work well so my question is if I can have the server tell if it is a fax machine and then send it to the fax but if not then it will send it to the phone. And if this is possible then how would I do it b/c I am new to this.

look at the wiki !! search the forum !! if you search the wiki for “fax detection” you’ll find a number of pages that will give you the info you seek.