Hello Del,
The mask is applied by the Selintra AGI just before it issues the dial statement. The dialplan you create in the route does its work much earlier.
Here's a route dial plan and a trunk mask for a SAIL box running in the 407 area-code...
_011X. _1NXXXXXXXXX _NXXXXXXXXX _NXXXXXX
and...
:1407 1407407:1407 14071407:1407 1407011:011
It should work for 7 digit local numbers, 10 digit 407 numbers, 11 digit (1 + area code + subscriber number) national numbers and international numbers.
I haven't run this mask on a live box so YMMV. It should be close tho'

Just fire up an asterisk console in verbose mode and start dialing. You should see on the console what the mask is doing to your dialed numbers.
You have to be very strange to be good at masks

So... if the above masks don't work then I'm not as strange as I thought I was...
Er... I'll go now...
Kind Regards
Selintra