Extension to trunk mapping

I have this situation - my extensions are the three last numbers from the trunk.
I have some trunks like these (external numbers from my provider): 352111, 352112, 352113.
The extensions (internal numbers): 111, 112, 113.
I want to map extension to trunk - when extension 111 dial something to go though trunk 352111.
All solutions I looked use prefixes but I want to do something like in next example but without messing with macros.
Sample config:

exten => _X.,1,NoOp()
exten => _X.,n,Set(LAST="${CALLERID(num)}")
exten => _X.,n,NoOp(${LAST})
exten => _X.,n,Set(CALLERID(all)=352${LAST}<352${LAST}>
exten => _X.,n,Dial(SIP/${EXTEN}@352${LAST})
exten => _X.,n,Hangup()

In the above example if caller is 111 it will go through 352111 SIP trunk without using any prefix in extension.
Thanks for any assistance.

You could add an outbound route in FreePBX for each extension and in the match pattern put

111|X. , 112|X. and 113|X. respectively.

Then you can create a little code in extensions_custom.conf like this:

[steer-calls]
exten => _XXXXX., 1, ,Set(LAST="${CALLERID(num)}")
exten => _XXXXX., n, goto(outbound-allroutes,${LAST}${EXTEN},1)
include => from-internal

Put the phones in the “steer-calls” context. Now when you dial more than 5 digits, the “steer-calls” context will prepend the dialed number with the extension number. Then your outbound routes that you created above will trap the call, strip the extension number, and make the call. All other calls will go to the “from-internal” context.