diff --git a/resources/templates/provision/grandstream/gxp17xx/{$mac}.xml b/resources/templates/provision/grandstream/gxp17xx/{$mac}.xml
index 6a2a4f5c42..812044fc97 100644
--- a/resources/templates/provision/grandstream/gxp17xx/{$mac}.xml
+++ b/resources/templates/provision/grandstream/gxp17xx/{$mac}.xml
@@ -5806,7 +5806,7 @@
-0
+{if isset($grandstream_ipv_mode)}{$grandstream_ipv_mode}{else}0{/if}