Receiving fax with distinctive ring setup help

I have ditingtive ring for incomming fax on the same line
if I turn on: usedistinctiveringdetection=yes
I get 2 partterns
Detected ring pattern: 368,337,0
Detected ring pattern: 368,338,0

how can I divert one call to normal prom-pstn context and one to internal fax to email

Im using Asterisknow 7.1 astersik 1.6 free pbx 2.9