From 22ea69305bb4db5274e1852ee41d5651810190a7 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Sun, 30 Dec 2018 15:20:19 +0000 Subject: Adjust Polycom template and PUT parsing for VVX Call Waiting option The Polycom VVX phones have an option in the Menu where the users can Enable/Disable the Call Waiting feature themselves (that is the global config, not per line/registration) It's available in: Menu -> Settings -> Basic -> Preferences -> Call Waiting When this option is changed the phone will push its configuration back to the provisioning server (MACADDRESS-phone.cfg) including the value call.callWaiting.enable=0 Since this parameter is not being parsed the database information is not updated and it becomes difficult to troubleshoot when the user reports that Call Waiting is not working (the provisioning web interface shows the option as enabled) With this patch we ensure that the value is properly parsed and the database gets updated showing the correct information --- config/process_put.lua | 4 ++++ config/templates/polycom-template.lua | 1 + 2 files changed, 5 insertions(+) diff --git a/config/process_put.lua b/config/process_put.lua index 0222ddf..ff203fd 100644 --- a/config/process_put.lua +++ b/config/process_put.lua @@ -65,6 +65,10 @@ function process_polycom() elseif n == "up.screenSaver.enabled" then params.value.device.value.screensaverenable.value = (v == "1") + -- this attribute enables call waiting (for the entire device, not per line) + elseif n == "call.callWaiting.enable" then + params.value.services.value.callwaitingenable.value = (v == "1") + else -- search attribute name for reg_name like "reg.1." -- and for rest like "fwdStatus" diff --git a/config/templates/polycom-template.lua b/config/templates/polycom-template.lua index 2e3725d..4aa42f8 100644 --- a/config/templates/polycom-template.lua +++ b/config/templates/polycom-template.lua @@ -215,6 +215,7 @@ if values.services then if not values.services.callwaitingenable then -- only allow one call per line key xml_attr({ 'call.callsPerLineKey' }, '1' ) + xml_attr({ 'call.callWaiting.enable' }, '0' ) end if values.services.forwarding then enable.forwarding = true -- cgit v1.2.3