Dialplan

You can configure a dialplan per Identity. There can be ONE dialplan with min. one or more rules. Every rule contains a matching pattern (regexp) und the replace pattern.

e.g.:

<dialplan>
  <rule>
    <pattern>0([0-9]*)</pattern> 
    <replace>0049$1</replace>
  </rule>
  <rule> 
    <pattern>([0-9]+)</pattern>
    <replace>0$1</replace>
  </rule>
</dialplan>

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