Multiple teams, outbound CID by country/area code

In it’s current form, this dialplan would apply to all outbound calls from all extensions. It would need to be modified for your use case which is fairly complex.

If each user is a member of one and only one group, you could repurpose the extension’s accountcode field to indicate which custom dialplan to run.

Lines 57-58 are where the area codes start with only 2 examples. You can list as many or as few area codes as you want in this section using the same format and you can add a general case of _XXX. The way things are written, the lines are not executed in order, they will match more specific cases first and the more general cases last.