<dialplan xmlns='http://schemas.microsoft.com/embedded/VoIP'>
<dialplan-header>
<host>#use_sipsrv_host_name#</host>
</dialplan-header>
<!-- Dial Plan rules -->
<!-- IP address rules -->
<rule pattern='\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'
restrict='Cell,SMS'
/>
<rule pattern='(\d{1,3})\*(\d{1,3})\*(\d{1,3})\*(\d{1,3})'
dial='\1.\2.\3.\4'
display='\1.\2.\3.\4'
transfer='\1.\2.\3.\4'
restrict='Cell,SMS'
/>
<!-- (0xxx) yyyy -->
<rule pattern='\(0(\d{2,5})\)*\s*(\d{1,10})\s*-*\s*(\d{1,6})*'
dial='sip:0049\1\2\3@$host$'
display='+49 \1 \2 \3'
transfer='sip:0049\1\2\3@$host$'
/>
<!-- 0xxx / yyyy -->
<rule pattern='0([^0]\d{1,4})\s*/*\s*(\d{1,10})\s*-*\s*(\d{1,6})*'
dial='sip:0049\1\2\3@$host$'
display='+49 \1 \2 \3'
transfer='sip:0049\1\2\3@$host$'
/>
<!-- + Prefix -->
<rule pattern='\+(\d+)'
dial='sip:00\1@$host$'
display='+\1'
transfer='sip:00\1@$host$'
/>
<rule pattern='\+(\d{1,3})\s*\(*\s*(\d{2,5})\)*\s*/*\s*(\d{1,10})\s*-*\s*(\d{1,6})*'
dial='sip:00\1\2\3\4@$host$'
display='+\1 \2 \3 \4'
transfer='sip:00\1\2\3\4@$host$'
/>
<!-- 00 Prefix -->
<rule pattern='00(\d{1,3})\s*\(*\s*(\d{2,5})\)*\s*/*\s*(\d{1,10})\s*-*\s*(\d{1,6})*'
dial='sip:00\1\2\3\4@$host$'
display='+\1 \2 \3 \4'
transfer='sip:00\1\2\3\4@$host$'
/>
<!-- Only digits -->
<rule pattern='(\d+)'
dial='sip:\1@$host$'
display='\1'
transfer='sip:\1@$host$'
/>
</dialplan>