Changeset 5523
- Timestamp:
- 12/16/07 13:19:41 (1 year ago)
- Files:
-
- modules/branches/2.4/core/functions.inc.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.4/core/functions.inc.php
r5512 r5523 2 2 3 3 class core_conf { 4 var $_sip_general = array(); 5 var $_iax_general = array(); 6 var $_featuregeneral = array(); 7 var $_featuremap = array(); 8 var $_applicationmap = array(); 4 9 // return an array of filenames to write 5 // files named like pinset_N6 10 function get_filename() { 7 11 $files = array( … … 11 15 'iax_registrations.conf', 12 16 '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', 13 22 ); 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 }20 23 return $files; 21 24 } … … 47 50 return $this->generate_zapata_additional($version); 48 51 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; 49 61 } 50 62 } … … 74 86 if (isset($this->_iax_general) && is_array($this->_iax_general)) { 75 87 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) { 76 133 $output .= $values['key']."=".$values['value']."\n"; 77 134 } … … 454 511 $core_conf->addIaxGeneral('allow','gsm'); 455 512 $core_conf->addIaxGeneral('mailboxdetail','yes'); 513 514 $core_conf->addFeatureMap('blindxfer','##'); 515 $core_conf->addFeatureMap('disconnect','**'); 516 $core_conf->addFeatureMap('automon','*1'); 456 517 } 457 518 … … 1219 1280 } 1220 1281 1221 1222 1223 1224 1225 1226 1227 1228 1282 /* begin page.ampusers.php functions */ 1229 1283
