UniFi VoIP - DHCP Option 66 Auto Provisioning Guide(Post 4.7)

Overview


UVP Devices can be configured via Configuration File through TFTP or HTTP/HTTPS download. 

When UVP device boots up or reboots, it will try to get the Provisioning server URL from DHCP option 66 and will try to fetch the configuration file named“uvpMAC.xml” from the provisioning server, where “MAC” is the MAC address of the UVP device and should be in upper case, for example “uvp24A43C065D85.xml”.

The provisioning process outlined in this document is compatible with UVP platform/Phone app version 4.7.0 or later.

 

Setup DHCP Option 66


DHCP option 66(TFTP Server Name) needs to be configured on the DHCP server to provide the provisioning server URL in the DHCP offer packet.

Provisioning Server Type/Protocol DHCP Option 66 URI Example
TFTP 192.168.100.1
HTTP http://192.168.100.1/provisioning
HTTPS (without certificate verifying) https://192.168.100.1/provisioning

Put the Configuration File on the Provisioning Server.

 

Configuration File Filename Format

uvp{UVP_MAC_UPPER_CASE}.xml

Example: uvp24A43C065D85.xml

 

Configuration File Content Format

The configuration file is in XML format, with the declaration for example, <?xml version="1.0" encoding="UTF-8" ?>

Each configuration item maps to a XML tag with a U prefixed string as it's tag name, which is the configuration key. The enclosed tag value is the configuration value. 

The U parameter key values from U00000 to U09999 are for global settings; the U values from U10000 to U89999 are for account 1 to account 8. The first digit represents the account ID.

All the U prefixed tags are the children of the root tag <provision version="1" /> and are on the same level. The root tag provision needs an attribute named version with a value to it.

Supported configuration items are list as below.

 

Device and Phone Global Parameters

U value parametersDescriptionType/RangeDefault valueNotesSupported since
U00003 Settings - Ethernet Configuration - Connection Type 0, 1 0

0:DHCP mode

1: Static IP mode

Note:

U00004, U00005, U00006, U00007, U00008 will be provisionable only when the U00003 value set to 1 (static IP mode).
If U00003 value set to 0 (DHCP mode), the U00004, U00005, U00006, U00007, U00008 values will be all ignored.

 

5.0.4.610
U00004 Settings - Ethernet Configuration - IP Address String     5.0.4.610
U00005 Settings - Ethernet Configuration - Network prefix length int 0-32     5.0.4.610
U00006 Settings - Ethernet Configuration - DNS address 1 String     5.0.4.610
U00007 Settings - Ethernet Configuration - DNS address 2 String     5.0.4.610
U00008 Settings - Ethernet Configuration - Gateway address String     5.0.4.610
U00009 Codec list and priority String 9,0,8 PCMU-0
PCMA-8
G722-9
G726-111
Opus-108
GSM-3
iLBC-104
Speex 32K-99
Speex 8K-97
Speex 16K-98
 
U00010 Log level Integer / [0-6] 4 0 - turn off pjsip log
1 - Error
2 - Warning
3 - Info
4 - Debug
5 - Verbose
6 - Very detailed events
 
U00011 Software EC enable Boolean 1    
U00012 DNS SRV Boolean 0    
U00013 STUN servers String stun.l.google.com:19302    
U00014 Show phone app Dialpad when handset being lifted Boolean 1   5.0.4.610
U00015 App to be launched when handset lifted String com.ubnt.uvp/com.ubnt.unifi.phone.MainActivity

Format: package_name/Activity_name

Possible values: (case sensitive)
com.ubnt.uvp/com.ubnt.unifi.phone.MainActivity (UniFI Phone)
com.android.chrome/com.google.android.apps.chrome.Main (Google Chrome browser). 

5.0.4.610
U00016 Select SIP account when making a call Boolean 0 Default disabled. 5.0.4.610
U00017 DTMF type Integer 1

0: Inband
1: RFC2833
2: SIP INFO 

5.0.4.610
U00018 Immersive full-screen mode Boolean 0    
U00019 Provisioning server URL manual entry String   http/https url or tftp 5.0.4.610
U00020 Provisioning server http/https username String     5.0.4.610
U00021 Provisioning server http/https password String     5.0.4.610
U00022 Allow DHCP option 66 to override manual provision server Boolean     5.0.4.610
U00023 Contact download Server / vcf file url String   http/https url for the vcf file 5.0.4.610
U00024 Contact download url http/https username String     5.0.4.610
U00025 Contact download url http/https password String     5.0.4.610
U00026 Language String   format example: en, en_US, zh_TW 5.0.4.610
U00027 Timezone String   format example: GMT+08:00, GMT-04:30, Asia/Taipei 5.0.4.610
U00028 Show IP address of PBX at incoming calls Boolean true    5.0.4.610 
U00029 Enable VAD Boolean false    5.0.11.637
U00030 Enable Sidetone Boolean false    5.0.11.637 
U00031 Show BLF Boolean false    5.0.11.637 
U00033 Always Ring via Speaker Boolean false   5.0.11.637
U00034 Mic Volume String  1.0  Accepted values: 0.0-20.0 5.0.11.637 

 

SIP accounts parameters (Account 1 example, the first digit represents the account ID)

 

U10027TURN PasswordStringEmpty String U10027TURN PasswordStringEmpty String U10027TURN PasswordStringEmpty String U10027TURN PasswordStringEmpty String U10027TURN PasswordStringEmpty String U10027TURN PasswordStringEmpty String U10027TURN PasswordStringEmpty String 

U Value Description Type/Range Default Value Notes Supported Version
U10000 Account enable Boolean 1    
U10001 Lock account Boolean 0    
U10002 SIP Server String Empty String ie. sip.example.com
By default port 5060 is used, however you can append a different port if needed.
ie. sip.example.com:5061
 
U10004 IP-based Boolean 0    
U10005 Username String Empty String    
U10006 Password String Empty String    
U10007 Authentication Name String Empty String    
U10008 Display Name String Empty String    
U10009 Display Extension String Empty String    
U10010 Voicemail Number String Empty String    
U10011 Outbound Proxy String Empty String    
U10014 Registration Expiry Integer 3600 minimum is 30  
U10015 DSCP for RTP Integer 46    
U10016 SIP over TCP Boolean 0    
U10017 RTP Start Port Integer 4000    
U10018 RTP Port Range Integer 0    
U10021 Enable STUN Boolean 0    
U10022 Enable ICE Boolean 0    
U10023 Enable TURN Boolean 0    
U10024 TURN Conn Type Integer 0 0: UDP
1:TCP
2: TLS
 
U10025 TURN Servers String Empty String    
U10026 TURN Username String Empty String    
U10027 TURN Password String Empty String    
U10028 Allow VIA Rewrite Boolean 0    5.0.11.637
U10029 Allow Contact Rewrite Boolean 0    5.0.11.637
U10030 Allow SDP NAT Rewrite Boolean 0    5.0.11.637
U10034 Enable MWI Boolean 0    5.0.11.637
U10035 Call Pickup Prefix String Empty String    5.0.11.637
U10036 DTMF Mode String Empty String    5.0.11.637

 * If URI is empty, the actual SIP URI will be "sip:UserName@Domain" where UserName is username given for AuthUserName.

 

Configuration File Content Examples


Below are an example of the configuration file. Most cases, the phone administrator can work out a template based on this to extend and provision a bunch of the phones.

Version 2 parameters supporting App Versions 5.0.4.610

<?xml version="1.0" encoding="UTF-8" ?>
<provision version="10000">
 
 <!-- U00003 value:  0: DHCP mode(default), 1: Static-IP mode. U00004, U00005, U00006, U00007, U00008 values will be all ignored if in DHCP mode. -->
 <U00003> 0 </U00003>
 <U00004> 10.2.0.200</U00004>
 <U00005> 24 </U00005>
 <U00006> 168.95.192.1 </U00006>
 <U00007> 8.8.8.8 </U00007>
 <U00008> 10.2.0.254 </U00008>
  
  <!--# Codec list priority sequence-->
  <U00009>111, 9, 0, 8</U00009>
  <!--# Log level: 0 ~ 6: Default: 4 -->
  <U00010>6</U00010>
  <!--# Software EC -->
  <U00011>1</U00011>
  <!--# DNS SRV -->
  <U00012>1</U00012>
  <!--# Stun servers -->
  <U00013>stun.server</U00013>

  <!--# DTMF type -->
  <U00017> 1 </U00017>

  <!--# Immersive mode -->
  <U00018>0</U00018>

  <U00026> en_US </U00026>
  <U00027>GMT+8</U00027>

<!--# Account 1-->
  <!--# Account Active. 0 - No, 1 - Yes. Default value is 0-->
  <U10000>1</U10000>
  <!--# SIP Server-->
  <U10002> 10.2.0.35 </U10002>
<!--# SIP User ID-->
  <U10005>989 </U10005>
<!--# SIP password-->
  <U10006>ubnt</U10006>
<!--# SIP auth id-->
  <U10007></U10007>
<!--# SIP display name-->
  <!--<U10008></U10008> -->
<!--# SIP display extension-->
  <!--<U10009></U10009> -->
<!--# SIP voicemail number-->
  <!--<U10010></U10010> -->
<!--# SIP Outbound Proxy-->
  <U10011></U10011>
<!--# SIP Registration Expiry -->
  <U10014> 600 </U10014>

<!--# Enable STUN -->
  <U10021>1</U10021>
<!--# Enable ICE -->
  <U10022>0</U10022>
<!--# Enable TURN -->
  <U10023>0</U10023>
<!--# TURN Conn Type -->
  <U10024>1</U10024>
<!--# TURN Servers -->
  <U10025>turn.server</U10025>
<!--# TURN username -->
  <U10026>turn-test@ubnt.com</U10026>
<!--# TURN password -->
  <U10027>ubntubnt</U10027>
<!--# end of Account 1 -->

</provision>

Version 1 parameters supporting App version 4.7.0.507

<?xml version="1.0" encoding="UTF-8" ?>
<provision version="1">
  <!-- per device global settings -->
  <!--# Codec list priority sequence-->
  <U00009>111,9,0,8</U00009>
  <!--# Log level: 0 ~ 6 -->
  <U00010>5</U00010>
  <!--# Software EC -->
  <U00011>1</U00011>
  <!--# DNS SRV -->
  <U00012>1</U00012>
  <!--# Stun servers -->
  <U00013>stun1.l.google.com:19302</U00013>
  <!--# DTMF type -->
  <U00017>0</U00017>
  <!--# Immersive mode -->
  <U00018>0</U00018>
 
<!--# Account 1-->
  <!--# Account Active. 0 - No, 1 - Yes. Default value is 1-->
  <U10000>1</U10000>
  <!--# SIP Server-->
  <U10002>pbx.server.com</U10002>
<!--# SIP User ID-->
  <U10005>user_id</U10005>
<!--# SIP password-->
  <U10006>sip_password</U10006>
<!--# SIP auth id-->
  <U10007>auth_id</U10007>
<!--# SIP display name-->
  <U10008></U10008>
<!--# SIP display extension-->
  <U10009></U10009>
<!--# SIP voicemail number-->
  <U10010></U10010>
<!--# SIP Outbound Proxy-->
  <U10011></U10011>
<!--# SIP Registration Expiry -->
  <U10014>360</U10014>
<!--# end of Account 1 -->
 
</provision>
 

Version 1 parameters supporting App version 4.7.0.507 with NAT STUN

<?xml version="1.0" encoding="UTF-8" ?>
<provision version="1">
  <!-- per device global settings -->
  <!--# Codec list priority sequence-->
  <U00009>111, 9, 0, 8 </U00009>
  <!--# Log level: 0 ~ 6: Default: 4 -->
  <U00010>5</U00010>
  <!--# Software EC Default: 1 -->
  <U00011>1</U00011>
  <!--# DNS SRV -->
  <U00012>1</U00012>
  <!--# Stun servers -->
  <U00013>stun.server</U00013>
  <!--# DTMF type -->
  <U00017>0</U00017>
  <!--# Immersive mode -->
  <U00018>0</U00018>
<!--# Account 1-->
  <!--# Account Active. 0 - No, 1 - Yes. Default value is 1 -->
  <U10000>1</U10000>
  <!--# SIP Server-->
  <U10002>pbx.server.com</U10002>
<!--# SIP User ID-->
  <U10005>user_id</U10005>
<!--# SIP password-->
  <U10006>sip_password</U10006>
<!--# SIP auth id-->
  <U10007>auth_id</U10007>
<!--# SIP display name-->
  <U10008></U10008>
<!--# SIP display extension-->
  <U10009></U10009>
<!--# SIP voicemail number-->
  <U10010></U10010>
<!--# SIP Outbound Proxy-->
  <U10011>proxy.server.com</U10011>
<!--# SIP Registration Expiry -->
  <U10014>3600</U10014>
<!--# Enable STUN -->
  <U10021>1</U10021>
<!--# Enable ICE -->
  <U10022>0</U10022>
<!--# Enable TURN -->
  <U10023>0</U10023>
<!--# TURN Conn Type -->
  <U10024>1</U10024>
<!--# TURN Servers -->
  <U10025>turn.server</U10025>
<!--# TURN username -->
  <U10026>stun@ubnt.com</U10026>
<!--# TURN password -->
  <U10027>ubnt</U10027>
<!--# end of Account 1 -->
</provision>