Distinct Ring Tone

I have a basic fxo card in my box and I am interfacing it with a business line that has a distinct ring tone on it… my question is can the aterisk box be configured to do one of two things with this…

  1. Answer the ring UNLESS it is the distinct ring tone (so dont answer my distinct ringtone).
  2. Answer the line and detect the distinct ring and direct it at an extension.

This is in regards to faxing.

Thanks for your help…