One PSTN In, to Phone & Fax?

I had a question put to me the other day, and it is as follows.

If Asterisk was set up to recieve a line from the PSTN, is it possible that in the event of a fax coming through on that line, Asterisk could detect this and route the call to the fax machine, and if it’s a normal call, route to the telephone?

I’m assuming here that FXO would recieve from the PSTN, then he’d need two FXS, one going to a normal phone and the other to the fax.

If this is possible, are there any issues in doing it?

sure can. if you’re using AAH, it’s pretty straightforward…

Well, that’s brilliant. Is there anything Asterisk cannot do!? Impressive bit of open source or what!!!