Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions endpoint/polycom/splm/buddylist.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
}
]
}
]
}
]
}
}
5 changes: 3 additions & 2 deletions endpoint/polycom/splm/family_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"id": "6",
"template_data": [
"linekeys.json",
"template_data.json"
"template_data.json",
"buddylist.json"
]
},
{
Expand All @@ -61,4 +62,4 @@
}
]
}
}
}
15 changes: 15 additions & 0 deletions endpoint/polycom/splm/phone.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down