Changeset 12962 for freepbx

Show
Ignore:
Timestamp:
11/15/11 08:09:07 (2 years ago)
Author:
mbrevda
Message:

re #5451 - abstract app_meetme to transparently support app_meetme OR app_confbridge

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.10/amp_conf/htdocs/admin/libraries/extensions.class.php

    r12941 r12962  
    10131013  var $options; 
    10141014  var $pin; 
     1015  var $app; 
    10151016   
    10161017  function ext_meetme($confno, $options='', $pin='') { 
     1018    global $amp_conf; 
    10171019    $this->confno = $confno; 
    10181020    $this->options = $options; 
    1019     $this->pin = $pin; 
    1020   } 
    1021    
    1022   function output() { 
    1023     return "MeetMe(".$this->confno.",".$this->options.",".$this->pin.")"; 
     1021    $this->pin = $pin ? $pin : ','; 
     1022     
     1023    //use confbridge if requested, pruning meetme only options 
     1024    switch ($amp_conf['ASTCONFAPP']) { 
     1025      case 'app_meetme': 
     1026        $this->app = 'MeetMe'; 
     1027        break; 
     1028      case 'app_confbridge': 
     1029        $this->app = 'ConfBridge'; 
     1030        //remove invalid options 
     1031        $this->options = str_replace(array('b', 'C', 'd', 'D',  
     1032                          'e', 'E', 'F', 'i',  
     1033                          'I', 'l', 'o', 'P',  
     1034                          'r', 's', 't', 'T',  
     1035                          'x', 'X'), '', $this->options); 
     1036        $this->options = preg_replace('/[GpSL]\(.*\)/', '', $this->options); 
     1037        $this->options = preg_replace('/w\(.*\)/', 'w', $this->options); 
     1038        break; 
     1039    } 
     1040  } 
     1041 
     1042  function output() { 
     1043    return $this->app . "(".$this->confno.",".$this->options.",".$this->pin.")"; 
    10241044  } 
    10251045} 
  • freepbx/branches/2.10/libfreepbx.install.php

    r12941 r12962  
    22072207  $set['hidden'] = 0; 
    22082208 
    2209  
     2209  // ASTCONFAPP 
     2210  $set['value'] = 'app_meetme'; 
     2211  $set['options'] = 'app_meetme, app_confbridge'; 
     2212  $set['defaultval'] =& $set['value']; 
     2213  $set['readonly'] = 0; 
     2214  $set['hidden'] = 0; 
     2215  $set['level'] = 0; 
     2216  $set['module'] = ''; 
     2217  $set['category'] = 'Dialplan and Operational'; 
     2218  $set['emptyok'] = 1; 
     2219  $set['name'] = 'Conference Room App'; 
     2220  $set['description'] = 'The asterisk application to use for conferencing.'; 
     2221  $set['type'] = CONF_TYPE_SELECT; 
     2222  $freepbx_conf->define_conf_setting('ASTCONFAPP', $set); 
     2223   
    22102224  // The following settings are used in various modules prior to 2.9. If they are found in amportal.conf then we 
    22112225  // retain their values until the individual modules are updated and their install scripts run where a full