From b0bbae3a407b476d3121b904e1d888a2b1e56a25 Mon Sep 17 00:00:00 2001 From: demonspork Date: Mon, 19 Oct 2020 00:11:43 -0500 Subject: [PATCH] GXP17xx Template Improvements Various basic variables were missing like transport type and sip_port and basic things were wrong like Accept Incoming SIP from Proxy Only was disabled. This template P codes are almost identical to the GXP16XX except that the loops for button programming doesn't seem to work with it at least with my limited testing, so they are left out for now. Tested and working with firmware 1.0.1.89 --- app/provision/resources/classes/provision.php | 3 + .../provision/grandstream/gxp17xx/{$mac}.xml | 120 ++++++++++++++++-- 2 files changed, 111 insertions(+), 12 deletions(-) diff --git a/app/provision/resources/classes/provision.php b/app/provision/resources/classes/provision.php index 0d87cf90ce..a5e702093f 100644 --- a/app/provision/resources/classes/provision.php +++ b/app/provision/resources/classes/provision.php @@ -460,6 +460,9 @@ include "root.php"; $templates['HW GXP1620'] = 'grandstream/gxp16xx'; $templates['HW GXP1625'] = 'grandstream/gxp16xx'; $templates['HW GXP1630'] = 'grandstream/gxp16xx'; + $templates['HW GXP1760W'] = 'grandstream/gxp17xx'; + $templates['HW GXP1780'] = 'grandstream/gxp17xx'; + $templates['HW GXP1782'] = 'grandstream/gxp17xx'; $templates['HW GXP2124'] = 'grandstream/gxp2124'; $templates['HW GXP2130'] = 'grandstream/gxp2130'; $templates['HW GXP2135'] = 'grandstream/gxp2135'; diff --git a/resources/templates/provision/grandstream/gxp17xx/{$mac}.xml b/resources/templates/provision/grandstream/gxp17xx/{$mac}.xml index fe878be725..d33990621b 100644 --- a/resources/templates/provision/grandstream/gxp17xx/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp17xx/{$mac}.xml @@ -773,7 +773,7 @@ -{$account.1.server_address} +{$account.1.server_address}:{$account.1.sip_port} @@ -781,11 +781,19 @@ +{if isset($account.1.outbound_proxy_primary)} +{$account.1.outbound_proxy_primary}:{$account.1.sip_port} +{else} +{/if} +{if isset($account.1.outbound_proxy_secondary)} +{$account.1.outbound_proxy_secondary}:{$account.1.sip_port} +{else} +{/if} @@ -816,7 +824,11 @@ +{if isset($grandstream_dns_mode)} +{$grandstream_dns_mode} +{else} 0 +{/if} @@ -833,7 +845,11 @@ +{if isset($grandstream_nat_traversal)} +{$grandstream_nat_traversal} +{else} 0 +{/if} @@ -911,7 +927,12 @@ -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} @@ -936,7 +957,12 @@ +{if isset($subscribe_mwi)} +1 +{else} 0 +{/if} + @@ -1017,7 +1043,9 @@ -0 +{if isset($grandstream_blf_call_pickup)} +{$grandstream_blf_call_pickup} +{/if} @@ -1146,7 +1174,7 @@ -0 +1 @@ -1217,7 +1245,11 @@ +{if isset($grandstream_srtp)} +{$grandstream_srtp} +{else} 0 +{/if} @@ -1448,11 +1480,11 @@ -{$display_name_2} +{$account.2.display_name} -{$server_address_2} +{$account.2.server_address}:{$account.2.sip_port} @@ -1460,11 +1492,19 @@ +{if isset($account.2.outbound_proxy_primary)} +{$account.2.outbound_proxy_primary}:{$account.2.sip_port} +{else} +{/if} +{if isset($account.2.outbound_proxy_secondary)} +{$account.2.outbound_proxy_secondary}:{$account.2.sip_port} +{else} +{/if} @@ -1472,7 +1512,7 @@ -{$account.2.user_id} + @@ -1495,7 +1535,11 @@ +{if isset($grandstream_dns_mode)} +{$grandstream_dns_mode} +{else} 0 +{/if} @@ -1512,7 +1556,11 @@ +{if isset($grandstream_nat_traversal)} +{$grandstream_nat_traversal} +{else} 0 +{/if} @@ -1590,7 +1638,12 @@ -0 +{$tp=0} +{if $account.2.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.2.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.2.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.2.sip_transport == 'dns srv'}{$tp=1}{/if} +{$tp} @@ -1615,7 +1668,12 @@ +{if isset($subscribe_mwi)} +1 +{else} 0 +{/if} + @@ -1696,7 +1754,9 @@ -0 +{if isset($grandstream_blf_call_pickup)} +{$grandstream_blf_call_pickup} +{/if} @@ -1895,7 +1955,11 @@ +{if isset($grandstream_srtp)} +{$grandstream_srtp} +{else} 0 +{/if} @@ -2120,7 +2184,7 @@ -{$account.3.server_address} +{$account.3.server_address}:{$account.3.sip_port} @@ -2128,11 +2192,19 @@ +{if isset($account.3.outbound_proxy_primary)} +{$account.3.outbound_proxy_primary}:{$account.3.sip_port} +{else} +{/if} +{if isset($account.3.outbound_proxy_secondary)} +{$account.3.outbound_proxy_secondary}:{$account.3.sip_port} +{else} +{/if} @@ -2163,7 +2235,11 @@ +{if isset($grandstream_dns_mode)} +{$grandstream_dns_mode} +{else} 0 +{/if} @@ -2180,7 +2256,11 @@ +{if isset($grandstream_nat_traversal)} +{$grandstream_nat_traversal} +{else} 0 +{/if} @@ -2258,7 +2338,12 @@ -0 +{$tp=0} +{if $account.3.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.3.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.3.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.3.sip_transport == 'dns srv'}{$tp=1}{/if} +{$tp} @@ -2283,7 +2368,12 @@ +{if isset($subscribe_mwi)} +1 +{else} 0 +{/if} + @@ -2364,7 +2454,9 @@ -0 +{if isset($grandstream_blf_call_pickup)} +{$grandstream_blf_call_pickup} +{/if} @@ -2562,7 +2654,11 @@ +{if isset($grandstream_srtp)} +{$grandstream_srtp} +{else} 0 +{/if}