diff --git a/resources/templates/provision/grandstream/gxw42xx/{$mac}.xml b/resources/templates/provision/grandstream/gxw42xx/{$mac}.xml
index 737a938698..e2b556976a 100644
--- a/resources/templates/provision/grandstream/gxw42xx/{$mac}.xml
+++ b/resources/templates/provision/grandstream/gxw42xx/{$mac}.xml
@@ -4,19 +4,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -528,7 +516,7 @@
-{$account.1.server_address}
+{$account.1.server_address}:{$account.1.sip_port}
@@ -541,7 +529,12 @@
-
+
+{if isset($account.1.outbound_proxy_primary)}
+ {$account.1.outbound_proxy_primary}:{$account.1.sip_port}
+{else}
+{$account.1.outbound_proxy_primary}
+{/if}
@@ -550,7 +543,12 @@
+
+{if isset($grandstream_dns_mode)}
+{$grandstream_dns_mode}
+{else}
0
+{/if}
@@ -567,7 +565,12 @@
+
+{if isset($grandstream_nat_traversal)}
+{$grandstream_nat_traversal}
+{else}
0
+{/if}
@@ -586,7 +589,13 @@
-0
+
+{$tp=0}
+{if $account.1.sip_transport == 'udp'}{$tp=0}{/if}
+{if $account.1.sip_transport == 'tcp'}{$tp=1}{/if}
+{if $account.1.sip_transport == 'tls'}{$tp=2}{/if}
+{if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if}
+{$tp}
@@ -596,7 +605,7 @@
-0
+1
@@ -882,7 +891,12 @@
+
+{if isset($grandstream_srtp)}
+{$grandstream_srtp}
+{else}
0
+{/if}