diff --git a/resources/templates/provision/grandstream/gxv3240/{$mac}.xml b/resources/templates/provision/grandstream/gxv3240/{$mac}.xml
index d3eec5cb12..4e91560712 100644
--- a/resources/templates/provision/grandstream/gxv3240/{$mac}.xml
+++ b/resources/templates/provision/grandstream/gxv3240/{$mac}.xml
@@ -4393,7 +4393,7 @@
-0
+{if isset($grandstream_ipv_mode)}{$grandstream_ipv_mode}{else}0{/if}