diff --git a/resources/templates/provision/grandstream/gxp16xx/{$mac}.xml b/resources/templates/provision/grandstream/gxp16xx/{$mac}.xml
index 0f7ed204f3..c29799eea5 100644
--- a/resources/templates/provision/grandstream/gxp16xx/{$mac}.xml
+++ b/resources/templates/provision/grandstream/gxp16xx/{$mac}.xml
@@ -1780,7 +1780,7 @@
-0
+{if isset($grandstream_ipv_mode)}{$grandstream_ipv_mode}{else}0{/if}