I have an outbound route that includes calls to 09XXXXXXXX go to trunk A
…but I have a list of specific destinations (which are also 09XXXXXXXX) that I want to go to trunk B.
Example of the list:
0912345678
0923456789
0934567890
You can use the Class Of Service “Route Selections” module to prioritize outbound routes, make sure you apply the route selection to the COS that your extensions use (most likely All Permissions)
How it works.
Asterisk will by default prioritize explicit extension over patterns, however, that only applies if they’re all in the same context, and since VitalPBX is using separate contexts for each outbound route, and they’re including them in the ARS-all context (which is included in the cos-all-post context), they will be processed in the order they were included, which defaults to the order they were created. What Route Selections does, is that it creates a new ARS context (i.e. ARS-2) and includes the outbound routes in the order you specify in the GUI instead of first created. (See asterisk documentation)