The log you posted would appear to be another issue altogether. You are sending only a 9, but the gateway cannot be found, apparently.
If you have 9 as the prefix for flowroute, then you can use 8 as the prefix for your second provider. But, the number sent to the gateway must be the full number (as you previously sent), with the leading digit (the 9 or 8) removed.
I don't know where you're located, or the number format used so I will use North America numbers as an example.
Local number are usually 10 digits (with an areacode). So for local calls you'd have 2 rules numbers beginning with 9, 11 digits long, strip 1 digit and send to provider 1. The second would be numbers beginning with 8, 11 digits long, strip 1 digit and send to provider 2.
For national calls...calls beginning with 91, 12 digits long, strip 1 digit (or two, if your provider does not want the leading 1). Then a second rule using the 81.
Then repeat for international calls with an 8 and a 9 leading digit. You must also accommodate "special", shorter numbers as well. The outbound rules can also be restricted to only certain extensions, if you wish to block some from using one of the providers , or placing international calls.
You can also place the second trunk group as a backup, if all trunks on the first are busy.
And remember , rules are read top to bottom.