Context to make logical group

Hi,

I have a running asterisk which i manually edit sip.conf and extensions.conf.
Now i’m trying to learn FreePBX.

I have some extensions let say i have these extensions 11001, 11002, 12001, 12002.
And make logical separation using context (i’m not sure if this is the best way)
[11001]
context=location-A-out

[11002]
context=location-A-out

[12001]
context=location-B-out

[12002]
context=location-B-out

And below are my current dialplan.
To dial same location user can just dial 3 digits.
To dial another location user need to dial 99+full digits.
[location-A-out]
exten => _XXX,1,Dial(sip/11${EXTEN},60,t)
exten => _99XXXXX,1,Dial(sip/${EXTEN:2},60,t)

[location-B-out]
exten => _XXX,1,Dial(sip/11${EXTEN},60,t)
exten => _99XXXXX,1,Dial(sip/${EXTEN:2},60,t)

How can i achieve above behaviour in FreePBX?

Thanks