diff --git a/resources/templates/provision/grandstream/gxw42xx/{$mac}.xml b/resources/templates/provision/grandstream/gxw42xx/{$mac}.xml
index 3260ed5f5b..96d53b271a 100644
--- a/resources/templates/provision/grandstream/gxw42xx/{$mac}.xml
+++ b/resources/templates/provision/grandstream/gxw42xx/{$mac}.xml
@@ -18,7 +18,11 @@
+{if isset($grandstream_ip_address_mode)}
+{$grandstream_ip_address_mode}
+{else}
0
+{/if}