Changeset 5523

Show
Ignore:
Timestamp:
12/16/07 13:19:41 (1 year ago)
Author:
p_lindheimer
Message:

#2568 changes to support more control of features.conf and deprecate parking_additional.inc into more general features.conf setup

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.4/core/functions.inc.php

    r5512 r5523  
    22 
    33class core_conf { 
     4        var $_sip_general    = array(); 
     5        var $_iax_general    = array(); 
     6        var $_featuregeneral = array(); 
     7        var $_featuremap     = array(); 
     8        var $_applicationmap = array(); 
    49        // return an array of filenames to write 
    5         // files named like pinset_N 
    610        function get_filename() { 
    711                $files = array( 
     
    1115                        'iax_registrations.conf', 
    1216                        'zapata_additional.conf', 
     17                        'sip_general_additional.conf', 
     18                        'iax_general_additional.conf', 
     19                        'features_general_additional.conf', 
     20                        'features_applicationmap_additional.conf', 
     21                        'features_featuremap_additional.conf', 
    1322                        ); 
    14                 if (isset($this->_sip_general) && is_array($this->_sip_general)) { 
    15                         $files[] = 'sip_general_additional.conf'; 
    16                 } 
    17                 if (isset($this->_iax_general) && is_array($this->_iax_general)) { 
    18                         $files[] = 'iax_general_additional.conf'; 
    19                 } 
    2023                return $files; 
    2124        } 
     
    4750                                return $this->generate_zapata_additional($version); 
    4851                                break; 
     52                        case 'features_general_additional.conf': 
     53                                return $this->generate_featuregeneral_additional($version); 
     54                                break; 
     55                        case 'features_applicationmap_additional.conf': 
     56                                return $this->generate_applicationmap_additional($version); 
     57                                break; 
     58                        case 'features_featuremap_additional.conf': 
     59                                return $this->generate_featuremap_additional($version); 
     60                                break; 
    4961                } 
    5062        } 
     
    7486                if (isset($this->_iax_general) && is_array($this->_iax_general)) { 
    7587                        foreach ($this->_iax_general as $values) { 
     88                                $output .= $values['key']."=".$values['value']."\n"; 
     89                        } 
     90                } 
     91                return $output; 
     92        } 
     93 
     94        function addFeatureGeneral($key, $value) { 
     95                $this->_featuregeneral[] = array('key' => $key, 'value' => $value); 
     96        } 
     97 
     98        function generate_featuregeneral_additional($ast_version) { 
     99                $output = ''; 
     100 
     101                if (isset($this->_featuregeneral) && is_array($this->_featuregeneral)) { 
     102                        foreach ($this->_featuregeneral as $values) { 
     103                                $output .= $values['key']."=".$values['value']."\n"; 
     104                        } 
     105                } 
     106                return $output; 
     107        } 
     108 
     109        function addFeatureMap($key, $value) { 
     110                $this->_featuremap[] = array('key' => $key, 'value' => $value); 
     111        } 
     112 
     113        function generate_featuremap_additional($ast_version) { 
     114                $output = ''; 
     115 
     116                if (isset($this->_featuremap) && is_array($this->_featuremap)) { 
     117                        foreach ($this->_featuremap as $values) { 
     118                                $output .= $values['key']."=".$values['value']."\n"; 
     119                        } 
     120                } 
     121                return $output; 
     122        } 
     123 
     124        function addApplicationMap($key, $value) { 
     125                $this->_applicationmap[] = array('key' => $key, 'value' => $value); 
     126        } 
     127 
     128        function generate_applicationmap_additional($ast_version) { 
     129                $output = ''; 
     130 
     131                if (isset($this->_applicationmap) && is_array($this->_applicationmap)) { 
     132                        foreach ($this->_applicationmap as $values) { 
    76133                                $output .= $values['key']."=".$values['value']."\n"; 
    77134                        } 
     
    454511                                $core_conf->addIaxGeneral('allow','gsm'); 
    455512                                $core_conf->addIaxGeneral('mailboxdetail','yes'); 
     513 
     514                                $core_conf->addFeatureMap('blindxfer','##'); 
     515                                $core_conf->addFeatureMap('disconnect','**'); 
     516                                $core_conf->addFeatureMap('automon','*1'); 
    456517                        } 
    457518 
     
    12191280} 
    12201281 
    1221  
    1222  
    1223  
    1224  
    1225  
    1226  
    1227  
    12281282/* begin page.ampusers.php functions */ 
    12291283