Thank you for your time Michael.
I don't think the previous behavior is the best choice but I think both the old and the new behavior miss something.
Yes, there is a failover option but no way to be sure which one will be the primary.
If the primary and failover have the same patterns since they just are (for example) outgoing providers without any other route specification and that to be a failover provider the patterns must be compatible, how would you configure them to know which one will be the primary provider?
For now, only the lexicographic sort order of the provider name will have an effect on that (hence why I choose to add a priority number as provider name prefix).
A more elegant way would be for you to include that provider priority setting in the GUI, just by ordering them as you already order Calling Group members.
Then, the only remaining question would be, should you separate the providers pattern in the dialplan under 'include' directives or mix them.
Here is the effect of both approach:
Provider 1:
0Z.
00Z.
Provider 2:
0Z.
0032Z.
Method 1 (pre r1732): keep the strict provider ordering by using 'include' directives
The provider's 2 rules will only be matched against if no rules of provider 1 matches the dialed number.
Effective rules order:
00Z. => Provider 1
0Z. => Provider 1
0032Z. => Provider 2
0Z. => Provider 2
003228888888 will then use provider 1.
028888888 will also use provider 1.
Method 2 (r1732): inline all the rules in the same (phone-outgoing) context without using includes
The only ordering remaining from the provider name ordering (or explicit priority if implemented) here would be for equal rules.
Effective rules order:
0032Z. => Provider 2
00Z. => Provider 1
0Z. => Provider 1
003228888888 will then use provider 2.
028888888 will use provider 1.
As you see, in both case, the provider ordering has an impact on the effective rules order.
Cheers