From 910549919b57541029ab0b4cbede6a73ff406244 Mon Sep 17 00:00:00 2001 From: demonspork Date: Mon, 21 Jun 2021 21:17:58 -0500 Subject: [PATCH] Grandstream headset ring (#5967) * Add Grandstream Headset/Speaker Ring Add variable to choose whether the speaker rings with the headset. * Add Speaker Only option Add note that speaker only is supported with a value of 2. --- app/grandstream/app_config.php | 8 ++++++++ .../templates/provision/grandstream/grp2612/{$mac}.xml | 4 +++- .../templates/provision/grandstream/grp2612w/{$mac}.xml | 4 +++- .../templates/provision/grandstream/grp2613/{$mac}.xml | 4 +++- .../templates/provision/grandstream/grp2614/{$mac}.xml | 4 +++- .../templates/provision/grandstream/grp2615/{$mac}.xml | 4 +++- .../templates/provision/grandstream/grp2616/{$mac}.xml | 4 +++- .../templates/provision/grandstream/grp26xx/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxp116x/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxp140x/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxp140xbk/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxp1450/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxp1450bk/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxp16xx/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxp17xx/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxp2100/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxp2124/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxp2130/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxp2135/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxp2140/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxp2160/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxp2170/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxp21xx/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxp21xxbk/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxp2200/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxp3240/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxv3175/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxv3175v2/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxv3240/{$mac}.xml | 4 +++- .../templates/provision/grandstream/gxv3275/{$mac}.xml | 4 +++- .../templates/provision/grandstream/wp820/{$mac}.xml | 4 +++- 31 files changed, 98 insertions(+), 30 deletions(-) diff --git a/app/grandstream/app_config.php b/app/grandstream/app_config.php index 5f2533113e..8fc58d76a7 100644 --- a/app/grandstream/app_config.php +++ b/app/grandstream/app_config.php @@ -326,6 +326,14 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "HEADSET Key Mode. 0 - Default Mode, 1 - Toggle Headset/Speaker. Default is 0"; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c245a640-9caa-472a-9e5a-f2f0392c40ff"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_headset_ring"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Always Ring Speaker. 0 - No, 1 - Yes both, 2 - Yes Speaker Only. Default is 0"; + $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "453ec939-ef61-4ecd-ad0a-31905153efd8"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_auto_attended_transfer"; diff --git a/resources/templates/provision/grandstream/grp2612/{$mac}.xml b/resources/templates/provision/grandstream/grp2612/{$mac}.xml index dbfe571a93..ec0ce5480e 100644 --- a/resources/templates/provision/grandstream/grp2612/{$mac}.xml +++ b/resources/templates/provision/grandstream/grp2612/{$mac}.xml @@ -3944,7 +3944,9 @@ - 0 +{if isset($grandstream_headset_ring)} + {$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/grp2612w/{$mac}.xml b/resources/templates/provision/grandstream/grp2612w/{$mac}.xml index dadda5b812..54b99c17c3 100644 --- a/resources/templates/provision/grandstream/grp2612w/{$mac}.xml +++ b/resources/templates/provision/grandstream/grp2612w/{$mac}.xml @@ -4039,7 +4039,9 @@ - 0 +{if isset($grandstream_headset_ring)} + {$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/grp2613/{$mac}.xml b/resources/templates/provision/grandstream/grp2613/{$mac}.xml index 4c59aa8fdb..5c0954011a 100644 --- a/resources/templates/provision/grandstream/grp2613/{$mac}.xml +++ b/resources/templates/provision/grandstream/grp2613/{$mac}.xml @@ -4784,7 +4784,9 @@ - 0 +{if isset($grandstream_headset_ring)} + {$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/grp2614/{$mac}.xml b/resources/templates/provision/grandstream/grp2614/{$mac}.xml index 9b8bc65605..cb7601df98 100644 --- a/resources/templates/provision/grandstream/grp2614/{$mac}.xml +++ b/resources/templates/provision/grandstream/grp2614/{$mac}.xml @@ -6107,7 +6107,9 @@ - 0 +{if isset($grandstream_headset_ring)} + {$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/grp2615/{$mac}.xml b/resources/templates/provision/grandstream/grp2615/{$mac}.xml index 7107dd29fd..feb2615a80 100644 --- a/resources/templates/provision/grandstream/grp2615/{$mac}.xml +++ b/resources/templates/provision/grandstream/grp2615/{$mac}.xml @@ -7126,7 +7126,9 @@ - 0 +{if isset($grandstream_headset_ring)} + {$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/grp2616/{$mac}.xml b/resources/templates/provision/grandstream/grp2616/{$mac}.xml index 72be3c7a69..225564382f 100644 --- a/resources/templates/provision/grandstream/grp2616/{$mac}.xml +++ b/resources/templates/provision/grandstream/grp2616/{$mac}.xml @@ -8014,7 +8014,9 @@ - 0 +{if isset($grandstream_headset_ring)} + {$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/grp26xx/{$mac}.xml b/resources/templates/provision/grandstream/grp26xx/{$mac}.xml index c3350960fc..034418489b 100644 --- a/resources/templates/provision/grandstream/grp26xx/{$mac}.xml +++ b/resources/templates/provision/grandstream/grp26xx/{$mac}.xml @@ -7288,7 +7288,9 @@ - 0 +{if isset($grandstream_headset_ring)} + {$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxp116x/{$mac}.xml b/resources/templates/provision/grandstream/gxp116x/{$mac}.xml index 9069b3272f..20f41ede91 100644 --- a/resources/templates/provision/grandstream/gxp116x/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp116x/{$mac}.xml @@ -1298,7 +1298,9 @@ -0 +{if isset($grandstream_headset_ring)} +{$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxp140x/{$mac}.xml b/resources/templates/provision/grandstream/gxp140x/{$mac}.xml index 03fcc26fa6..664b21960f 100644 --- a/resources/templates/provision/grandstream/gxp140x/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp140x/{$mac}.xml @@ -1556,7 +1556,9 @@ - 0 +{if isset($grandstream_headset_ring)} + {$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxp140xbk/{$mac}.xml b/resources/templates/provision/grandstream/gxp140xbk/{$mac}.xml index b3974b0d2f..cef836eeef 100644 --- a/resources/templates/provision/grandstream/gxp140xbk/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp140xbk/{$mac}.xml @@ -1556,7 +1556,9 @@ - 0 +{if isset($grandstream_headset_ring)} + {$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxp1450/{$mac}.xml b/resources/templates/provision/grandstream/gxp1450/{$mac}.xml index fd521edfb7..0947459759 100644 --- a/resources/templates/provision/grandstream/gxp1450/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp1450/{$mac}.xml @@ -2062,7 +2062,9 @@ -0 +{if isset($grandstream_headset_ring)} +{$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxp1450bk/{$mac}.xml b/resources/templates/provision/grandstream/gxp1450bk/{$mac}.xml index c893fc4fd3..79d6987dbb 100644 --- a/resources/templates/provision/grandstream/gxp1450bk/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp1450bk/{$mac}.xml @@ -1869,7 +1869,9 @@ -0 +{if isset($grandstream_headset_ring)} +{$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxp16xx/{$mac}.xml b/resources/templates/provision/grandstream/gxp16xx/{$mac}.xml index ffacc1510a..87efac1345 100644 --- a/resources/templates/provision/grandstream/gxp16xx/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp16xx/{$mac}.xml @@ -2724,7 +2724,9 @@ -0 +{if isset($grandstream_headset_ring)} +{$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxp17xx/{$mac}.xml b/resources/templates/provision/grandstream/gxp17xx/{$mac}.xml index bfb62b6b77..d295a4cf7d 100644 --- a/resources/templates/provision/grandstream/gxp17xx/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp17xx/{$mac}.xml @@ -3890,7 +3890,9 @@ -0 +{if isset($grandstream_headset_ring)} +{$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxp2100/{$mac}.xml b/resources/templates/provision/grandstream/gxp2100/{$mac}.xml index 33e0d419e3..e0a1f55a82 100644 --- a/resources/templates/provision/grandstream/gxp2100/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2100/{$mac}.xml @@ -3479,7 +3479,9 @@ - 0 +{if isset($grandstream_headset_ring)} + {$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxp2124/{$mac}.xml b/resources/templates/provision/grandstream/gxp2124/{$mac}.xml index fc120a10a9..dddd5ff01b 100644 --- a/resources/templates/provision/grandstream/gxp2124/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2124/{$mac}.xml @@ -2303,7 +2303,9 @@ - 0 +{if isset($grandstream_headset_ring)} + {$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxp2130/{$mac}.xml b/resources/templates/provision/grandstream/gxp2130/{$mac}.xml index c5615e3ffe..28153bed00 100644 --- a/resources/templates/provision/grandstream/gxp2130/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2130/{$mac}.xml @@ -7981,7 +7981,9 @@ - 0 +{if isset($grandstream_headset_ring)} + {$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxp2135/{$mac}.xml b/resources/templates/provision/grandstream/gxp2135/{$mac}.xml index ae10e1ef0f..437fe38a0b 100644 --- a/resources/templates/provision/grandstream/gxp2135/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2135/{$mac}.xml @@ -7973,7 +7973,9 @@ - 0 +{if isset($grandstream_headset_ring)} + {$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxp2140/{$mac}.xml b/resources/templates/provision/grandstream/gxp2140/{$mac}.xml index 512abbbd9e..b3eea5d0dd 100644 --- a/resources/templates/provision/grandstream/gxp2140/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2140/{$mac}.xml @@ -7973,7 +7973,9 @@ - 0 +{if isset($grandstream_headset_ring)} + {$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxp2160/{$mac}.xml b/resources/templates/provision/grandstream/gxp2160/{$mac}.xml index 11089a69b8..1627476f27 100644 --- a/resources/templates/provision/grandstream/gxp2160/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2160/{$mac}.xml @@ -7985,7 +7985,9 @@ - 0 +{if isset($grandstream_headset_ring)} + {$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxp2170/{$mac}.xml b/resources/templates/provision/grandstream/gxp2170/{$mac}.xml index ccce52b8ee..98bcab3fa6 100644 --- a/resources/templates/provision/grandstream/gxp2170/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2170/{$mac}.xml @@ -7973,7 +7973,9 @@ - 0 +{if isset($grandstream_headset_ring)} + {$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxp21xx/{$mac}.xml b/resources/templates/provision/grandstream/gxp21xx/{$mac}.xml index 99af016147..7d70b3caf1 100644 --- a/resources/templates/provision/grandstream/gxp21xx/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp21xx/{$mac}.xml @@ -3080,7 +3080,9 @@ Outgoing calls. 0 - No, 1 - Yes. Default is 0 --> - 0 +{if isset($grandstream_headset_ring)} + {$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxp21xxbk/{$mac}.xml b/resources/templates/provision/grandstream/gxp21xxbk/{$mac}.xml index 108bab328a..c05b54e007 100644 --- a/resources/templates/provision/grandstream/gxp21xxbk/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp21xxbk/{$mac}.xml @@ -3791,7 +3791,9 @@ Outgoing calls. 0 - No, 1 - Yes. Default is 0 --> -0 +{if isset($grandstream_headset_ring)} +{$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxp2200/{$mac}.xml b/resources/templates/provision/grandstream/gxp2200/{$mac}.xml index 0799796e30..0b5ebf9f1d 100644 --- a/resources/templates/provision/grandstream/gxp2200/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2200/{$mac}.xml @@ -2619,7 +2619,9 @@ Account 5 Codec Settings -0 +{if isset($grandstream_headset_ring)} +{$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxp3240/{$mac}.xml b/resources/templates/provision/grandstream/gxp3240/{$mac}.xml index 517dd0eb8d..a928c6c475 100644 --- a/resources/templates/provision/grandstream/gxp3240/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp3240/{$mac}.xml @@ -2830,7 +2830,9 @@ Account 5 Codec Settings -0 +{if isset($grandstream_headset_ring)} +{$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxv3175/{$mac}.xml b/resources/templates/provision/grandstream/gxv3175/{$mac}.xml index ea3253821b..4a159f28a0 100644 --- a/resources/templates/provision/grandstream/gxv3175/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxv3175/{$mac}.xml @@ -943,7 +943,9 @@ -0 +{if isset($grandstream_headset_ring)} +{$grandstream_headset_ring} +{/if} 0 diff --git a/resources/templates/provision/grandstream/gxv3175v2/{$mac}.xml b/resources/templates/provision/grandstream/gxv3175v2/{$mac}.xml index a2e69378f1..3979e60680 100644 --- a/resources/templates/provision/grandstream/gxv3175v2/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxv3175v2/{$mac}.xml @@ -488,7 +488,9 @@ - 0 +{if isset($grandstream_headset_ring)} + {$grandstream_headset_ring} +{/if} 0 diff --git a/resources/templates/provision/grandstream/gxv3240/{$mac}.xml b/resources/templates/provision/grandstream/gxv3240/{$mac}.xml index 4e91560712..41e76f3853 100644 --- a/resources/templates/provision/grandstream/gxv3240/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxv3240/{$mac}.xml @@ -4030,7 +4030,9 @@ -0 +{if isset($grandstream_headset_ring)} +{$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/gxv3275/{$mac}.xml b/resources/templates/provision/grandstream/gxv3275/{$mac}.xml index ca2f938dcf..526a52e9f4 100644 --- a/resources/templates/provision/grandstream/gxv3275/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxv3275/{$mac}.xml @@ -2958,7 +2958,9 @@ -0 +{if isset($grandstream_headset_ring)} +{$grandstream_headset_ring} +{/if} diff --git a/resources/templates/provision/grandstream/wp820/{$mac}.xml b/resources/templates/provision/grandstream/wp820/{$mac}.xml index 0f983ca56e..03242f0bc4 100644 --- a/resources/templates/provision/grandstream/wp820/{$mac}.xml +++ b/resources/templates/provision/grandstream/wp820/{$mac}.xml @@ -1385,7 +1385,9 @@ -0 +{if isset($grandstream_headset_ring)} +{$grandstream_headset_ring} +{/if}