jimates, I followed what you posted, and to experiment did it with a variation using a User Defined Digit Maps, actually two different User Defined Digit Maps.
Physical Interfaces -> Phone X -> OutboundCallRoute
Yours:
{([1-9]x?*(Mpli)):pp},{(<911:1xxxxxxxxxx>):spX},{(<#:>):ph2},{(<**8:>(Mbt)):bt},{**0:aa},{***:aa2},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**3:>(Msp3)):sp3},{(<**4:>(Msp4)):sp4},{(<**9:>(Mpp)):pp},{(Mpli):pli}
Mine:
{(<911:>(MlocalA911)):sp1},{([1-9]x?*(Mpli)):pp},{(<#:>):ph2},{**0:aa},{***:aa2},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**3:>(Msp3)):sp3},{(<**4:>(Msp4)):sp4},{(<**9:>(Mpp)):pp},{(Mpli):pli}
My User Defined Digit Map to make this work:
User Settings > User Defined Digit Maps
User Defined Digit Map2:
Label: localA911
DigitMap: (<:1xxxxxxxxxx>)
Did the same in my three ITSP Profiles.
Yours:
(<911:1xxxxxxxxxx>|(Mste))
Mine:
((MlocalB911)|1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|011xx.|xx.|(Mipd)|[^*#]@@.)
My User Defined Digit Map3
Label: localB911
DigitMap: (<911:1xxxxxxxxxx>)
My conclusions:
It all works together, but I observed some flakiness. Seeing that I made sure to test all combinations of 911, **1 (or 2 or 3) + 911, to make sure one route didn't break the other one.
Flakiness: Dialing 911, either directly or **X + 911 is dependent on some interdigit timing effects, and on more than a few occasions the call didn't go through (I heard the beginning of the first ring back tone, then that was immediately interrupted by a fast busy). I experimented with an S0 after the 911, but no observable difference.
I did this mostly to see if I could make it work, and to become more familiar with things. The good part about this is you go from having the ten-digit magic numbers configured inline in six different places to two different places (encapsulated in the right word), for ex. making it easier to change to test with a non-emergency number. I couldn't figure out a way to make it all work with one User Defined digit map, maybe that is the next session.
The other insight I arrived at is probably no one in my household is going to first dial **1 before dialing 911. So unless I can get it all to work with one user defined digit map, I'll revert to only having the direct 911 work, and the **1 will get a GV error message.
One more useful thing I learned is how the sequence in which the digit maps and outbound call routes are processed. Until you pointed it out, I had assumed a digit map is executed recursively. That is not so. They are processed once each in this order:
1. Physical line digit map.
2. Physical line outbound call route.
3. ITSP profile digit map.
That's it. On the plus side, there are several powerful syntax command characters available that are not used in any default digit map or call route, such as S0 as a suffix. Haven't experimented with these yet.