Changeset 15393
- Timestamp:
- 03/20/13 00:50:30 (2 months ago)
- Files:
-
- modules/branches/2.11/dahdiconfig/functions.inc.php (modified) (2 diffs)
- modules/branches/2.11/dahdiconfig/includes/dahdi_cards.class.php (modified) (3 diffs)
- modules/branches/2.11/dahdiconfig/module.xml (modified) (2 diffs)
- modules/branches/2.11/dahdiconfig/page.dahdi.php (modified) (3 diffs)
- modules/branches/2.11/dahdiconfig/views/dahdi_global_settings.php (modified) (1 diff)
- modules/branches/2.11/dahdiconfig/views/dahdi_modprobe_settings.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.11/dahdiconfig/functions.inc.php
r15382 r15393 32 32 } 33 33 */ 34 35 //Get dahdi version36 global $astman;37 $o = $astman->send_request('Command', array('Command' => 'dahdi show version'));38 39 $dahdi_info = explode("\n",$o['data']);40 if(preg_match('/DAHDI Version:(.*)Echo Canceller:/i',$o['data'],$matches)) {41 $dahdi_version = trim($matches[1]);42 } else {43 $dahdi_version = 9999;44 }45 $dahdi_ge_260 = version_compare($dahdi_version,'2.6.0','ge');46 34 47 35 require_once('includes/dahdi_cards.class.php'); … … 580 568 $currentcomponent->addguielem('_top', new guielement('dahdi-chan-html', $js, '')); 581 569 } 582 // End of File 570 571 function dahdiconfig_getinfo($info=null) { 572 global $astman; 573 574 if($astman && $astman->connected()) { 575 $o = $astman->send_request('Command', array('Command' => 'dahdi show version')); 576 577 switch ($info) { 578 case "version": 579 if(preg_match('/DAHDI Version:(.*)Echo Canceller:/i',$o['data'],$matches)) { 580 $dahdi_version = trim($matches[1]); 581 } else { 582 $dahdi_version = 9999; 583 } 584 return $dahdi_version; 585 break; 586 default: 587 $dahdi_info = explode("\n",$o['data']); 588 return $dahdi_info; 589 break; 590 } 591 } else { 592 return false; 593 } 594 595 } modules/branches/2.11/dahdiconfig/includes/dahdi_cards.class.php
r15382 r15393 885 885 $this->spans[$key]['dsid'] = $key; 886 886 $this->spans[$key][$attr] = $span[$attr]; 887 $this->spans[$key]['type'] = ( $this->spans[$key]['devicetype'] == 'W400') ? 'gsm' : $this->spans[$key]['type'];887 $this->spans[$key]['type'] = (isset($this->spans[$key]['devicetype']) && ($this->spans[$key]['devicetype'] == 'W400')) ? 'gsm' : (isset($this->spans[$key]['type']) ? $this->spans[$key]['type'] : ''); 888 888 switch($attr) { 889 889 case 'location': … … 1371 1371 public function write_modprobe() { 1372 1372 global $amp_conf; 1373 global $dahdi_ge_260; 1373 1374 $dahdi_ge_260 = version_compare(dahdiconfig_getinfo('version'),'2.6.0','ge'); 1374 1375 $file = $amp_conf['DAHDIMODPROBELOC']; 1375 1376 … … 1395 1396 1396 1397 $opts = array('opermode'=>'opermode', 'alawoverride'=>'alawoverride', 'boostringer'=>'boostringer', 'lowpower'=>'lowpower', 'fastringer'=>'fastringer', 'ringdetect'=>'fwringdetect', 'fxs_honor_mode'=>'fxshonormode', 'mode'=>'mode', 'defaultlinemode'=>'defaultline_mode'); 1397 if($dahdi_ge_260 ) {1398 if($dahdi_ge_260 && $data['module_name'] != 'wctdm') { 1398 1399 unset($opts['ringdetect']); 1399 1400 } modules/branches/2.11/dahdiconfig/module.xml
r15387 r15393 4 4 <category>Connectivity</category> 5 5 <name>DAHDi Config</name> 6 <version>2.11.2 0</version>6 <version>2.11.21</version> 7 7 <publisher>Schmoozecom</publisher> 8 8 <license>GPLv2</license> … … 10 10 <canuninstall>yes</canuninstall> 11 11 <changelog> 12 *2.11.21* Fixes #6434,#6436 (only show fwringer of module is wctdm) added italian re #6361 12 13 *2.11.20* Fixes #6420 dont allow usage of fwringdetect in 2.6.0 and greater 13 14 *2.11.19* Add sangoma GSM card control and setup modules/branches/2.11/dahdiconfig/page.dahdi.php
r15382 r15393 13 13 } 14 14 } 15 16 $dahdi_info = dahdiconfig_getinfo(); 17 $dahdi_ge_260 = version_compare(dahdiconfig_getinfo('version'),'2.6.0','ge'); 15 18 16 19 //Check to make sure dahdi is running. Display an error if it's not … … 266 269 $('#mp_setting_origsetting_key_0').val('') 267 270 271 if(j.module == "wctdm") { 272 $('#tr_ringdetect').show(); 273 } else { 274 $('#tr_ringdetect').hide(); 275 } 276 268 277 if(j.module == "wctc4xxp") { 269 278 $('#normal_mp_settings').hide(); … … 326 335 }) 327 336 } else { 337 if($(this).val() == "wctdm") { 338 $('#tr_ringdetect').show(); 339 } else { 340 $('#tr_ringdetect').hide(); 341 } 342 328 343 if(($(this).val() == "wct4xxp") || ($(this).val() == "wcte12xp")) { 329 344 $('#wct4xxp_wcte12xp_settings').show(); 345 $('#normal_mp_settings').hide(); 330 346 } else { 331 347 $('#wct4xxp_wcte12xp_settings').hide(); 348 $('#normal_mp_settings').show(); 332 349 } 333 350 modules/branches/2.11/dahdiconfig/views/dahdi_global_settings.php
r15079 r15393 12 12 <select id="language" name="language"> 13 13 <option value="en">English</option> 14 <option value="it">Italian</option> 14 15 </select> 15 16 </td> modules/branches/2.11/dahdiconfig/views/dahdi_modprobe_settings.php
r15382 r15393 177 177 </td> 178 178 </tr> 179 <?php if(!$dahdi_ge_260) {?> 180 <tr> 179 <tr id="tr_ringdetect" style="display:none;"> 181 180 <td style="width:10px;"> 182 181 <label for="ringdetect_checkbox"><a href="#" class="info">Ring Detect:<span>Specify whether to apply normal ring detection, or a full wave detection to prevent false ring detection for lines where CallerID is sent before the first ring and proceeded by a polarity reversal (as in the United Kingdom). If you are experiencing trouble with detecting CallerID from analog service providers, or have lines which exhibit a polarity reversal before CallerID is transmitted from the provider, then select Full Wave. If no choice is specified, the default is standard.</span></a></label> … … 190 189 </td> 191 190 </tr> 192 <?php } ?>193 191 <tr> 194 192 <td style="width:10px;">
