4/8/2010
The following provisioning XML example illustrates how to
configure all of the VoIP settings. It includes a complete Dial
Plan.
Note: |
The values of the
SIPsettings,
VoicemailSettings,
BackupSIPsettingsand
DialPlanparms are strings containing the specified server
information in XML format. You must replace all starting ("<")
and terminating (">") brackets within the XML string with
"<" and ">" respectively. |
Code Example
|
Copy Code
|
<characteristic type="VoIP">
<parm name="SIPsettings" value="<provision
key='1232ab03' name='VoIPPhoneCanvas'> <user
account='cetvoip\medtest08' password='test' uri='5555550100'
allowedauth='digest'/> <sipsrv addr='1.0.0.1'
protocol='UDP' role='proxy'> <session party='First'
type='pc2pc' /> <session party='First' type='pc2ph'
/> </sipsrv> <sipsrv addr='1.0.0.1'
protocol='UDP' role='registrar'/> </provision>"
/>
<parm name="VoicemailSettings" value="<provision
key='1232ab03' name='VoIPPhoneCanvas'> <user
account='cetvoip\medtest08' password='test' uri='5555550100'
allowedauth='digest'/> <sipsrv addr='1.0.0.1'
protocol='UDP' role='proxy'> <session party='First'
type='pc2pc' /> <session party='First' type='pc2ph'
/> </sipsrv> <sipsrv addr='1.0.0.1'
protocol='UDP' role='registrar'/> </provision>"
/>
<parm name="VoicemailNumber" value="5555550100" />
<parm name="BackupSIPsettings" value="<provision
key='1232ab03' name='VoIPPhoneCanvas' > <user
account='cetvoip\sptest5' password='test'
uri='sip:71110@redmond.corp.microsoft.com' allowedauth='digest'
/> <provider name='Test IP' /> <sipsrv
addr='1.0.0.1' protocol='TCP' role='proxy' > <session
party='First' type='pc2pc' /> <session party='First'
type='pc2ph' /> </sipsrv> <sipsrv
addr='1.0.0.1' protocol='TCP' role='registrar' />
</provision>" />
<parm name="DialPlan" value="<dialplan
xmlns='http://schemas.microsoft.com/embedded/VoIP'>
<dialplan-header>
<host>#use_sipsrv_host_name#</host>
</dialplan-header>
<!-- Dial Plan rules
--> <!-- IP address rules --> <!--
EQUIVALENT OF '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}' -->
<rule
pattern='(\d|\d\d|\d\d\d)\.(\d|\d\d|\d\d\d)\.(\d|\d\d|\d\d\d)\.(\d|\d\d|\d\d\d)'
restrict='Cell,SMS' />
<!-- EQUIVALENT OF
'(\d{1,3})\*(\d{1,3})\*(\d{1,3})\*(\d{1,3})' -->
<rule
pattern='(\d|\d\d|\d\d\d)\*(\d|\d\d|\d\d\d)\*(\d|\d\d|\d\d\d)\*(\d|\d\d|\d\d\d)'
dial='\1.\2.\3.\4' display='\1.\2.\3.\4' restrict='Cell,SMS'
/>
<!-- 11-digits rules
--> <!-- EQUIVALENT OF
'\+?\w*1\w*-?\w*(\d{3})\w*(\d{3})\w*-?\w*(\d{4})' -->
<rule
pattern='\+?\w*1\w*-?\w*(\d\d\d)\w*(\d\d\d)\w*-?\w*(\d\d\d\d)'
dial='sip:91\1\2\3@$host$' display='1 (\1) \2-\3' />
<!-- EQUIVALENT OF
'\+?\w*1\w*-?\w*\((\d{3})\)\w*(\d{3})\w*-?\w*(\d{4})' -->
<rule
pattern='\+?\w*1\w*-?\w*\((\d\d\d)\)\w*(\d\d\d)\w*-?\w*(\d\d\d\d)'
dial='sip:91\1\2\3@$host$' />
<!-- 10-digits rules
--> <!-- EQUIVALENT OF
'(\d{3})\w*(\d{3})\w*-?\w*(\d{4})' -->
<rule
pattern='(\d\d\d)\w*(\d\d\d)\w*-?\w*(\d\d\d\d)'
dial='sip:9\1\2\3@$host$' display='(\1) \2-\3' />
<!-- EQUIVALENT OF
'\((\d{3})\)\w*(\d{3})\w*-?\w*(\d{4})' -->
<rule
pattern='\((\d\d\d)\)\w*(\d\d\d)\w*-?\w*(\d\d\d\d)'
dial='sip:9\1\2\3@$host$' />
<!-- 7-digits rules
--> <!-- EQUIVALENT OF '(\d{3})\w*-?\w*(\d{4})'
-->
<rule
pattern='(\d\d\d)\w*-?\w*(\d\d\d\d)' dial='sip:9425\1\2@$host$'
display='\1-\2' />
<!-- SIP URI rules
--> <!-- EQUIVALENT OF
'[Ss][Ii][Pp][Ss]?:\w*(\d{3})(\d{3})(\d{4})@(.+)' -->
<rule
pattern='[Ss][Ii][Pp][Ss]?:\w*(\d\d\d)(\d\d\d)(\d\d\d\d)@(.+)'
display='(\1) \2-\3' restrict='Cell,SMS' />
<rule
pattern='([Ss][Ii][Pp][Ss]?:)?\w*([a-zA-Z0-9_-]+)@(.+)'
display='\2' restrict='Cell,SMS' /> <rule
pattern='[Ss][Ii][Pp][Ss]?:\w*([^@]+)' display='\1'
restrict='Cell,SMS' />
<!-- 5-digits rules
--> <!-- EQUIVALENT OF '(\d{3})-?(\d{2})' -->
<rule
pattern='(\d\d\d)-?(\d\d)' dial='sip:\1\2@$host$' display='\1\2'
/>
<!-- EQUIVALENT OF
'1\w*\((\d{3})\)\w*(\d)' -->
<rule
pattern='1\w*\((\d\d\d)\)\w*(\d)' dial='sip:1\1\2@$host$'
display='1\1\2' />
<!-- Block
international calls -->
<rule
pattern='011(\d+)' restrict='All' />
<!-- Only digits
-->
<rule pattern='(\d+)'
dial='sip:\1@$host$' display='\1' /> </dialplan>"
/>
</characteristic>
|
Remarks
One provisioning XML file typically contains
configuration information for multiple Configuration Service
Providers. To use this example, you must replace the values as
appropriate, and add the node as a child of the OMA Client
Provisioning file. For information about the syntax of this file,
see
OMA Client
Provisioning Files. For examples, see
OMA Client
Provisioning XML File Examples.
See Also