You already have that feature built into the Magix starting with R1.5, called "Allow-11". If a user dials "911" OR "9-911" the system will grab a trunk and dial 911
Tables->ARS->More->E911->Allow 11->[Select "Enable" or "Disable"]->Enter
will get you there.
You may have instances where users want to dial a long distance number, dial 9 for the ARS, and "fat-finger" the 1 before the area code, accidently calling 911. Make sure they know to stay on the line and apologise to the 911 operator!