I use a product called ActiveFax https://www.actfax.com

It does routing based on DID number dialed. And has quite a few features. I like it because of the ability to add faxing from the programs I develop.