You will need to give a much deeper description of what you want to do for someone to be able to give you proper assistance.
That said, you can adjust the dial plan by going to the Site configuration for the Site associated with the phones you wish to control. Create a Number Plan using a Regular Expression to match the type of number you want to match.
To send it to an Architect flow, the number dialed has to match a DID mapped to that flow in Call Routing, so for that I usually convert the number dialed into a single number that matches the desired DID as the output of the Number Plan. That will send the call to the flow, where you can do whatever you wish. If you still want to allow the call to go outbound, you'll probably have to gather the number dialed again and use a Transfer to Number action to send it outbound.
https://help.mypurecloud.com/video/how-to-add-a-number-plan/
https://help.mypurecloud.com/articles/add-number-plan/
------------------------------
George Ganahl GCP, GCSME, ICCE, ICHD, etc.
Senior Principal PS Consultant
Genesys
------------------------------