Changeset 11350

Show
Ignore:
Timestamp:
02/12/11 18:12:29 (2 years ago)
Author:
p_lindheimer
Message:

adds ccss.conf configurable settings and template re #778

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.9/campon/etc/ccss.conf

    r7630 r11350  
    2020;    along with FreePBX.  If not, see <http://www.gnu.org/licenses/>. 
    2121; 
    22 ; Copyright (C) 2004 Coalescent Systems Inc (Canada) 
    23 ; Copyright (C) 2006 Why Pay More 4 Less Pty Ltd (Australia) 
    24 ; Copyright (C) 2007 Astrogen LLC (USA) 
     22; Copyright (C) 2011 Astrogen LLC (USA) 
    2523 
    2624[general] 
    27 #include features_general_additional.conf 
    28 #include features_general_custom.conf 
    29  
    30 [applicationmap] 
    31 #include features_applicationmap_additional.conf 
    32 #include features_applicationmap_custom.conf 
    33  
    34 [featuremap] 
    35 #include features_featuremap_additional.conf 
    36 #include features_featuremap_custom.conf 
     25#include ccss_general_additional.conf 
     26#include ccss_general_custom.conf 
  • modules/branches/2.9/campon/functions.inc.php

    r11344 r11350  
    11<?php 
    2  
     2class campon_conf { 
     3  // return the filename to write 
     4  function get_filename() { 
     5    return "ccss_general_additional.conf"; 
     6  } 
     7  function addGeneralSetting($setting, $value) { 
     8    $this->_ccss_general[$setting] = $value; 
     9  } 
     10  // return the output that goes in the file 
     11  function generateConf() { 
     12    $output = ""; 
     13    if (isset($this->_ccss_general) && is_array($this->_ccss_general)) { 
     14      foreach ($this->_ccss_general as $setting => $value) { 
     15        $output .= "$setting = $value\n"; 
     16      } 
     17    } 
     18    return $output; 
     19  } 
     20
    321 
    422function campon_hookGet_config($engine) { 
     
    1937  global $ext;   
    2038  global $amp_conf; 
     39  global $campon_conf; 
    2140  switch($engine) { 
    2241    case "asterisk": 
     42 
     43      $campon_conf->addGeneralSettings('cc_max_requests',$amp_conf['CC_MAX_REQUESTS_GLOBAL']); 
     44 
     45      $campon_conf->addGeneralSettings('cc_available_devstate',$amp_conf['CC_OFFERED']); 
     46      $campon_conf->addGeneralSettings('cc_offered_devstate',$amp_conf['CC_OFFERED']); 
     47      $campon_conf->addGeneralSettings('cc_caller_requested_devstate',$amp_conf['CC_OFFERED']); 
     48      $campon_conf->addGeneralSettings('cc_active_devstate',$amp_conf['CC_PENDING']); 
     49      $campon_conf->addGeneralSettings('cc_callee_ready_devstate',$amp_conf['CC_PENDING']); 
     50      $campon_conf->addGeneralSettings('cc_caller_busy_devstate',$amp_conf['CC_CALLER_BUSY']); 
     51      $campon_conf->addGeneralSettings('cc_recalling_devstate',$amp_conf['CC_RECALL']); 
     52 
    2353      if (is_array($featurelist = featurecodes_getModuleFeatures($modulename))) { 
    2454        foreach($featurelist as $item) { 
  • modules/branches/2.9/campon/install.php

    r11342 r11350  
    5050// CC_FORCE_DEFAULTS 
    5151// 
    52 $set['value'] = false; 
     52$set['value'] = true; 
    5353$set['defaultval'] =& $set['value']; 
    5454$set['readonly'] = 0; 
     
    298298$freepbx_conf->define_conf_setting('CC_MONITOR_CID_PREPEND_DEFAULT',$set); 
    299299 
     300// CC_MAX_REQUESTS_GLOBAL 
     301// 
     302$set['value'] = '20'; 
     303$set['defaultval'] =& $set['value']; 
     304$set['options'] = array(1,1000); 
     305$set['readonly'] = 0; 
     306$set['hidden'] = 0; 
     307$set['level'] = 1; 
     308$set['module'] = 'campon'; 
     309$set['category'] = 'Camp-On Module'; 
     310$set['emptyok'] = 0; 
     311$set['name'] = "Maximum Active Camp-On Requests"; 
     312$set['description'] = "System wide maximum number of outstanding Camp-On requests that can be active. This limit is useful on a system that may have memory constraints since the internal state machine takes up system resources relative to the number of active requests it has to track. Restart Asterisk for changes to take effect."; 
     313$set['type'] = CONF_TYPE_INT; 
     314$freepbx_conf->define_conf_setting('CC_MAX_REQUESTS_GLOBAL',$set); 
     315 
     316$options = array('NOT_INUSE', 'INUSE', 'BUSY', 'UNAVAILABLE', 'RINGING', 'RINGINUSE', 'ONHOLD'); 
     317 
     318// CC_OFFERED 
     319// Used for: cc_available, cc_offered, cc_caller_requested 
     320// 
     321$set['value'] = 'NOT_INUSE'; 
     322$set['defaultval'] =& $set['value']; 
     323$set['options'] = $options; 
     324$set['readonly'] = 0; 
     325$set['hidden'] = 0; 
     326$set['level'] = 1; 
     327$set['module'] = 'campon'; 
     328$set['category'] = 'Camp-On Module'; 
     329$set['emptyok'] = 0; 
     330$set['name'] = "Camp-On Available BLF State"; 
     331$set['description'] = "This is the state that will be set for BLF subscriptions after attempting a call while it is still possible to Camp-On to the last called number, prior to the offer_timer expiring. Restart Asterisk for changes to take effect."; 
     332$set['type'] = CONF_TYPE_SELECT; 
     333$freepbx_conf->define_conf_setting('CC_OFFERED',$set); 
     334 
     335// CC_PENDING 
     336// Used for: cc_active, cc_callee_ready 
     337// 
     338$set['value'] = 'INUSE'; 
     339$set['defaultval'] =& $set['value']; 
     340$set['options'] = $options; 
     341$set['readonly'] = 0; 
     342$set['hidden'] = 0; 
     343$set['level'] = 1; 
     344$set['module'] = 'campon'; 
     345$set['category'] = 'Camp-On Module'; 
     346$set['emptyok'] = 0; 
     347$set['name'] = "Camp-On Pending BLF State"; 
     348$set['description'] = "This is the state that will be set for BLF subscriptions upon a successful Camp-On request, pending a callback when the party becomes available. Restart Asterisk for changes to take effect."; 
     349$set['type'] = CONF_TYPE_SELECT; 
     350$freepbx_conf->define_conf_setting('CC_PENDING',$set); 
     351 
     352// CC_CALLER_BUSY 
     353// Used for: cc_caller_busy 
     354// 
     355$set['value'] = 'ONHOLD'; 
     356$set['defaultval'] =& $set['value']; 
     357$set['options'] = $options; 
     358$set['readonly'] = 0; 
     359$set['hidden'] = 0; 
     360$set['level'] = 1; 
     361$set['module'] = 'campon'; 
     362$set['category'] = 'Camp-On Module'; 
     363$set['emptyok'] = 0; 
     364$set['name'] = "Camp-On Busy Caller BLF State"; 
     365$set['description'] = "This is the state that will be set for BLF subscriptions once the callee becomes available if the caller is not busy. Restart Asterisk for changes to take effect."; 
     366$set['type'] = CONF_TYPE_SELECT; 
     367$freepbx_conf->define_conf_setting('CC_CALLER_BUSY',$set); 
     368 
     369// CC_RECALL 
     370// Used for: cc_recalling 
     371// 
     372$set['value'] = 'RINGING'; 
     373$set['defaultval'] =& $set['value']; 
     374$set['options'] = $options; 
     375$set['readonly'] = 0; 
     376$set['hidden'] = 0; 
     377$set['level'] = 1; 
     378$set['module'] = 'campon'; 
     379$set['category'] = 'Camp-On Module'; 
     380$set['emptyok'] = 0; 
     381$set['name'] = "Camp-On Recalling BLF State"; 
     382$set['description'] = "This is the state that will be set for BLF subscriptions once the callee becomes available if the caller is not busy. Restart Asterisk for changes to take effect."; 
     383$set['type'] = CONF_TYPE_SELECT; 
     384$freepbx_conf->define_conf_setting('CC_RECALL',$set); 
     385 
    300386$freepbx_conf->commit_conf_settings();