You can configure a dialplan per Identity.
There can be a single dialplan with one (minimum required) or more rules.
Every rule contains a matching pattern (regexp) und the replace pattern.
Number 123 will be changed to 0123.
Or number 0123 will be changed to 0049123.
Only one rule matches. There is no apply chain. The first rule that matches gets used, the rules are searched in the order they were provisioned.
Dialplan is used for all but every outgoing call (dialed manually or from addressbook).
An exception are calls made from calllogs unless otherwise configured in identity-settings -> useDialplanInCallLog