The route restriction works only on external dials, so it will not restrict internal numbers.( Reference P93 on the user manual ).
In case it’s an FXS extension, you can set hotline which will dial some IVR with those 2 extensions dialing options
In case it’s a SIP client you can set the diaplan also on the SIP client side
In any other case it can be done manually on the dialplan, please contact [email protected]