Changeset 11283

Show
Ignore:
Timestamp:
02/01/11 01:17:46 (2 years ago)
Author:
p_lindheimer
Message:

fixes some initial gui bugs re #778, still no real testing nor even dialpan generation, coming soon

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.9/campon/functions.inc.php

    r11281 r11283  
    8181        $ext->add($mcontext,$exten,'', new ext_noop_trace('calling a non-extesnion, policy enabled , continuing',6)); 
    8282        $ext->add($mcontext,$exten,'', new ext_set('CALLCOMPLETTION(cc_monitor_policy)', $amp_conf['CC_NON_EXTENSION_POLICY'])); 
    83         $ext->add($mcontext,$exten,'', new ext_set('CALLCOMPLETTION(cc_max_monitors)', $amp_conf['CC_MAX_MONITOR_DEFAULT'])); 
     83        $ext->add($mcontext,$exten,'', new ext_set('CALLCOMPLETTION(cc_max_monitors)', $amp_conf['CC_MAX_MONITORS_DEFAULT'])); 
    8484      } 
    8585      $ext->add($mcontext,$exten,'', new ext_return('')); 
     
    9191        $ext->add($mcontext,$exten,'is_exten', new ext_noop_trace('Callee has no settings and default enabled, continuing')); 
    9292        $ext->add($mcontext,$exten,'is_exten', new ext_set('CALLCOMPLETTION(cc_monitor_policy)', $amp_conf['CC_MONITOR_POLICY_DEFAULT'])); 
    93         $ext->add($mcontext,$exten,'', new ext_set('CALLCOMPLETTION(cc_max_monitors)', $amp_conf['CC_MAX_MONITOR_DEFAULT'])); 
     93        $ext->add($mcontext,$exten,'', new ext_set('CALLCOMPLETTION(cc_max_monitors)', $amp_conf['CC_MAX_MONITORS_DEFAULT'])); 
    9494      } 
    9595      $ext->add($mcontext,$exten,'', new ext_return('')); 
     
    145145      } 
    146146      $ext->add($mcontext,$exten,'', new ext_return('')); 
     147 
     148      // TODO: Add from-ccss-extension 
     149 
     150      // TODO: Add from-ccss-internal 
     151 
     152      // TODO: Add something (SHARED(), current blkvm, to voicemail to block recall from going there 
     153 
     154      // TODO: Alert-Info and CID Prepend probably in macro but determin 
    147155    break; 
    148156  } 
     
    318326 
    319327    $section = _('Call Camp-On Services'); 
    320     $currentcomponent->addguielem($section, new gui_selectbox('cc_agent_policy', $currentcomponent->getoptlist('cc_agent_policy'), $cc_agent_policy_label, $cc_agent_policy_tt, '', false)); 
    321     $currentcomponent->addguielem($section, new gui_selectbox('cc_monitor_policy', $currentcomponent->getoptlist('cc_monitor_policy'), $cc_monitor_policy_label, $cc_monitor_policy_tt, '', false)); 
    322  
    323328    // If we are forcing defaults, don't bother showing other settings 
    324329    if ($amp_conf['CC_FORCE_DEFAULTS']) { 
    325       $cc_default_settings_label = _("Configured to force default settings"); 
    326       $cc_default_settings_tt = " 
    327         <ul> 
     330      $cc_default_settings_label = _("Forcing default settings"); 
     331      $cc_default_settings_tt = _("The following settings are being used for all extensions. To configure individually set 'Only Use Default Camp-On Settings' to false on the Advanced Settings page. Active settings:") .  
     332       "<ul> 
    328333          <li>$cc_offer_timer_label: " . $amp_conf['CC_OFFER_TIMER_DEFAULT'] . "</li>  
    329334          <li>$ccnr_available_timer_label: " . $amp_conf['CCNR_AVAILABLE_TIMER_DEFAULT'] . "</li> 
     
    336341          <li>$cc_cid_prepend_label: " . $amp_conf['CC_CID_PREPEND_DEFAULT'] . "</li> 
    337342        </ul>"; 
    338       $currentcomponent->addguielem($section, new gui_link_label('cc_default_settings', $cc_default_settings_label, $cc_default_settings_tt, true), 0); 
     343      $currentcomponent->addguielem($section, new gui_link_label('cc_default_settings', $cc_default_settings_label, $cc_default_settings_tt, true)); 
     344    } 
     345    $currentcomponent->addguielem($section, new gui_selectbox('cc_agent_policy', $currentcomponent->getoptlist('cc_agent_policy'), $cc_agent_policy, $cc_agent_policy_label, $cc_agent_policy_tt, '', false)); 
     346    $currentcomponent->addguielem($section, new gui_selectbox('cc_monitor_policy', $currentcomponent->getoptlist('cc_monitor_policy'), $cc_monitor_policy, $cc_monitor_policy_label, $cc_monitor_policy_tt, '', false)); 
     347    if ($amp_conf['CC_FORCE_DEFAULTS']) { 
    339348      return; 
    340349    } 
     350 
    341351 
    342352    $cc_offer_timer =       $ccss['cc_offer_timer']; 
     
    365375    $msgInvalidCIDPrefix = _('Please enter a valid CID Prefix'); 
    366376 
    367     $currentcomponent->addguielem($section, new gui_selectbox('cc_offer_timer', $currentcomponent->getoptlist('cc_offer_timer'), $cc_offer_timer_label, $cc_offer_timer_tt, '', false)); 
    368     $currentcomponent->addguielem($section, new gui_selectbox('ccbs_available_timer', $currentcomponent->getoptlist('ccbs_available_timer'), $ccbs_available_timer_label, $ccbs_available_timer_tt, '', false)); 
    369     $currentcomponent->addguielem($section, new gui_selectbox('ccnr_available_timer', $currentcomponent->getoptlist('ccnr_available_timer'), $ccnr_available_timer_label, $ccnr_available_timer_tt, '', false)); 
    370     $currentcomponent->addguielem($section, new gui_selectbox('cc_recall_timer', $currentcomponent->getoptlist('cc_recall_timer'), $cc_recall_timer_label, $cc_recall_timer_tt, '', false)); 
    371     $currentcomponent->addguielem($section, new gui_selectbox('cc_max_agents', $currentcomponent->getoptlist('cc_max_agents'), $cc_max_agents_label, $cc_max_agents_tt, '', false)); 
    372     $currentcomponent->addguielem($section, new gui_selectbox('cc_agent_dialstring', $currentcomponent->getoptlist('cc_agent_dialstring'), $cc_agent_dialstring_label, $cc_agent_dialstring_tt, '', false)); 
    373     $currentcomponent->addguielem($section, new gui_selectbox('cc_max_monitors', $currentcomponent->getoptlist('cc_max_monitors'), $cc_max_monitors_label, $cc_max_monitors_tt, '', false)); 
     377 
     378    $currentcomponent->addguielem($section, new gui_selectbox('cc_offer_timer', $currentcomponent->getoptlist('cc_offer_timer'), $cc_offer_timer, $cc_offer_timer_label, $cc_offer_timer_tt, '', false)); 
     379    $currentcomponent->addguielem($section, new gui_selectbox('ccbs_available_timer', $currentcomponent->getoptlist('ccbs_available_timer'), $ccbs_available_timer, $ccbs_available_timer_label, $ccbs_available_timer_tt, '', false)); 
     380    $currentcomponent->addguielem($section, new gui_selectbox('ccnr_available_timer', $currentcomponent->getoptlist('ccnr_available_timer'), $ccnr_available_timer, $ccnr_available_timer_label, $ccnr_available_timer_tt, '', false)); 
     381    $currentcomponent->addguielem($section, new gui_selectbox('cc_recall_timer', $currentcomponent->getoptlist('cc_recall_timer'), $cc_recall_timer, $cc_recall_timer_label, $cc_recall_timer_tt, '', false)); 
     382    $currentcomponent->addguielem($section, new gui_selectbox('cc_max_agents', $currentcomponent->getoptlist('cc_max_agents'), $cc_max_agents, $cc_max_agents_label, $cc_max_agents_tt, '', false)); 
     383    $currentcomponent->addguielem($section, new gui_selectbox('cc_agent_dialstring', $currentcomponent->getoptlist('cc_agent_dialstring'), $cc_agent_dialstring, $cc_agent_dialstring_label, $cc_agent_dialstring_tt, '', false)); 
     384    $currentcomponent->addguielem($section, new gui_selectbox('cc_max_monitors', $currentcomponent->getoptlist('cc_max_monitors'), $cc_max_monitors, $cc_max_monitors_label, $cc_max_monitors_tt, '', false)); 
    374385 
    375386    //TODO: put in validation functions after the tt 
     
    396407    $ccss['cc_agent_dialstring'] =  isset($_REQUEST['cc_agent_dialstring']) ? $_REQUEST['cc_agent_dialstring'] : $amp_conf['CC_AGENT_DIALSTRING_DEFAULT']; 
    397408    $ccss['cc_monitor_policy'] =    isset($_REQUEST['cc_monitor_policy']) ? $_REQUEST['cc_monitor_policy'] : $amp_conf['CC_MONITOR_POLICY_DEFAULT']; 
    398     $ccss['cc_max_monitors'] =      isset($_REQUEST['cc_max_monitors']) ? $_REQUEST['cc_max_monitors'] : $amp_conf['CC_MAX_MONITOR_DEFAULT']; 
     409    $ccss['cc_max_monitors'] =      isset($_REQUEST['cc_max_monitors']) ? $_REQUEST['cc_max_monitors'] : $amp_conf['CC_MAX_MONITORS_DEFAULT']; 
    399410    $ccss['cc_alert_info'] =        isset($_REQUEST['cc_alert_info']) ? $_REQUEST['cc_alert_info'] : $amp_conf['CC_ALERT_INFO_DEFAULT']; 
    400411    $ccss['cc_cid_prepend'] =       isset($_REQUEST['cc_cid_prepend']) ? $_REQUEST['cc_cid_prepend'] : $amp_conf['CC_CID_PREPEND_DEFAULT']; 
     
    452463      $ccss['cc_max_agents'] =        $amp_conf['CC_MAX_AGENTS_DEFAULT']; 
    453464      $ccss['cc_agent_dialstring'] =  $amp_conf['CC_AGENT_DIALSTRING_DEFAULT']; 
    454       $ccss['cc_max_monitors'] =      $amp_conf['CC_MAX_MONITOR_DEFAULT']; 
     465      $ccss['cc_max_monitors'] =      $amp_conf['CC_MAX_MONITORS_DEFAULT']; 
    455466      $ccss['cc_alert_info'] =        $amp_conf['CC_ALERT_INFO_DEFAULT']; 
    456467      $ccss['cc_cid_prepend'] =       $amp_conf['CC_CID_PREPEND_DEFAULT']; 
  • modules/branches/2.9/campon/install.php

    r11281 r11283  
    8888// CC_OFFER_TIMER_DEFAULT 
    8989// 
    90 $set['value'] = 'generic'; 
     90$set['value'] = '30'; 
    9191$set['defaultval'] =& $set['value']; 
    9292$set['options'] = array('20', '30', '45', '60', '120', '180', '240', '300', '600'); 
     
    140140  $options[] = $i; 
    141141} 
    142 $set['value'] = '5'; 
     142$set['value'] = '15'; 
    143143$set['defaultval'] =& $set['value']; 
    144144$set['options'] = $options; 
     
    190190$freepbx_conf->define_conf_setting('CC_AGENT_DIALSTRING_DEFAULT',$set); 
    191191 
    192 // CC_MAX_MONITOR_DEFAULT 
     192// CC_MAX_MONITORS_DEFAULT 
    193193// 
    194194unset($options); 
     
    208208$set['description'] = "Asterisk: cc_max_monitors. This is the maximum number of callers that are allowed to queue up call completion requests against this extension."; 
    209209$set['type'] = CONF_TYPE_SELECT; 
    210 $freepbx_conf->define_conf_setting('CC_MAX_MONITOR_DEFAULT',$set); 
     210$freepbx_conf->define_conf_setting('CC_MAX_MONITORS_DEFAULT',$set); 
    211211 
    212212// CC_ALERT_INFO_DEFAULT