-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCampon.class.php
38 lines (38 loc) · 1.65 KB
/
Campon.class.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
namespace FreePBX\modules;
/*
* Class stub for BMO Module class
* In _Construct you may remove the database line if you don't use it
* In getActionbar change "modulename" to the display value for the page
* In getActionbar change extdisplay to align with whatever variable you use to decide if the page is in edit mode.
*
*/
class Campon implements \BMO {
public function __construct($freepbx = null) {
if ($freepbx == null) {
throw new Exception("Not given a FreePBX Object");
}
$this->FreePBX = $freepbx;
$this->ampconf = $freepbx->Config;
}
public function install(){}
public function uninstall(){}
public function backup() {}
public function restore($backup) {}
public function doConfigPageInit($page) {}
public function genConfig() {
if($this->ampconf->get('CC_ENABLE') === 0){
return array('ccss_general_additional.conf' => ";campon disabled in advanced settings");
}
$conf['cc_max_requests'] = $this->ampconf->get('CC_MAX_REQUESTS_GLOBAL');
$conf['cc_available_devstate'] = $this->ampconf->get('CC_BLF_OFFERED');
$conf['cc_offered_devstate'] = $this->ampconf->get('CC_BLF_OFFERED');
$conf['cc_caller_requested_devstate'] = $this->ampconf->get('CC_BLF_OFFERED');
$conf['cc_active_devstate'] = $this->ampconf->get('CC_BLF_PENDING');
$conf['cc_callee_ready_devstate'] = $this->ampconf->get('CC_BLF_PENDING');
$conf['cc_caller_busy_devstate'] = $this->ampconf->get('CC_BLF_CALLER_BUSY');
$conf['cc_recalling_devstate'] = $this->ampconf->get('CC_BLF_RECALL');
return array('ccss_general_additional.conf' => $conf);
}
public function writeConfig($config) { $this->FreePBX->WriteConfig($config); }
}