From 09e2648689bef44bead15a258124c8f215bb46aa Mon Sep 17 00:00:00 2001 From: Stephen Elaschuk Date: Fri, 17 Jul 2015 08:42:49 -0600 Subject: [PATCH 1/3] Create buddylist.json --- endpoint/polycom/splm/buddylist.json | 98 ++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 endpoint/polycom/splm/buddylist.json diff --git a/endpoint/polycom/splm/buddylist.json b/endpoint/polycom/splm/buddylist.json new file mode 100644 index 000000000..6bd006da0 --- /dev/null +++ b/endpoint/polycom/splm/buddylist.json @@ -0,0 +1,98 @@ +{ + "template_data":{ + "category":[ + { + "name":"Buddy List", + "subcategory":[ + { + "name":"Buddy List", + "item":[ + { + "variable":"$enablebl", + "default_value": 0, + "description":"Buddy List:", + "type":"radio", + "data":[ + { + "text":"Enabled", + "value":"1" + }, + { + "text":"Disabled", + "value":"0" + } + ] + }, + { + "variable":"$enableblsk", + "default_value": 1, + "description":"Buddy List Soft Keys:", + "type":"radio", + "data":[ + { + "text":"Enabled", + "value":"1" + }, + { + "text":"Disabled", + "value":"0" + } + ] + }, + { + "type":"break" + }, + { + "description":"Buddy List Options", + "type":"loop", + "loop_start":"1", + "loop_end":"32", + "data":{ + "item":[ + { + "variable":"$bl_fname", + "default_value":"", + "description":"Buddy List {$count} First Name", + "type":"input" + }, + { + "variable":"$bl_lname", + "default_value":"", + "description":"Buddy List {$count} Last Name", + "type":"input" + }, + { + "variable":"$bl_bext", + "default_value":"", + "description":"Extension", + "type":"input" + }, + { + "variable":"$bl_type", + "default_value":"", + "description":"Type", + "type":"list", + "data":[ + { + "text":"Speed Dial", + "value":"0" + }, + { + "text":"BLF", + "value":"1" + } + ] + }, + { + "type":"break" + } + ] + } + } + ] + } + ] + } + ] + } +} From 65cfaeccc5ec94f7628f107844ffb22285346a4a Mon Sep 17 00:00:00 2001 From: Stephen Elaschuk Date: Fri, 17 Jul 2015 08:44:27 -0600 Subject: [PATCH 2/3] Update phone.php Add buddylist settings --- endpoint/polycom/splm/phone.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/endpoint/polycom/splm/phone.php b/endpoint/polycom/splm/phone.php index 132be9bd9..1aad09d61 100755 --- a/endpoint/polycom/splm/phone.php +++ b/endpoint/polycom/splm/phone.php @@ -65,6 +65,21 @@ function config_files() { $this->settings['createdFiles'] = implode(', ', array_values($this->configfiles)); + //This is for the old school buddylist file + if (isset($this->settings['enablebl']) && ($this->settings['enablebl'] == 1)) { + $result['contacts/' . $this->mac . '-directory.xml'] = 'contacts/$mac-directory.xml'; + $this->settings['presence'] = 1; + foreach ($this->settings['loops']['bl'] as $key => $data) { + if (!empty($data['fname']) && !empty($data['bext'])) { + $this->settings['loops']['bl'][$key]['type'] = isset($this->settings['loops']['bl'][$key]['type']) ? $this->settings['loops']['bl'][$key]['type'] : '0'; + } else { + unset($this->settings['loops']['bl'][$key]); + } + } + } else { + $this->settings['presence'] = 0; + } + return $result; } From 9bc8d32e7ea5de91f9a0b50d392fd796c9875af7 Mon Sep 17 00:00:00 2001 From: Stephen Elaschuk Date: Fri, 17 Jul 2015 08:46:20 -0600 Subject: [PATCH 3/3] Update family_data.json Add buddylist.json to Polycom 601 --- endpoint/polycom/splm/family_data.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/endpoint/polycom/splm/family_data.json b/endpoint/polycom/splm/family_data.json index eca528271..59dc41394 100644 --- a/endpoint/polycom/splm/family_data.json +++ b/endpoint/polycom/splm/family_data.json @@ -47,7 +47,8 @@ "id": "6", "template_data": [ "linekeys.json", - "template_data.json" + "template_data.json", + "buddylist.json" ] }, { @@ -61,4 +62,4 @@ } ] } -} \ No newline at end of file +}