Changeset 15393

Show
Ignore:
Timestamp:
03/20/13 00:50:30 (2 months ago)
Author:
tm1000
Message:

Fixes #6434,#6436 (only show fwringer of module is wctdm) added italian re #6361

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.11/dahdiconfig/functions.inc.php

    r15382 r15393  
    3232 } 
    3333 */ 
    34   
    35 //Get dahdi version 
    36 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'); 
    4634  
    4735require_once('includes/dahdi_cards.class.php'); 
     
    580568  $currentcomponent->addguielem('_top', new guielement('dahdi-chan-html', $js, '')); 
    581569} 
    582 // End of File 
     570 
     571function 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  
    885885          $this->spans[$key]['dsid'] = $key; 
    886886        $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'] : '')
    888888        switch($attr) { 
    889889        case 'location': 
     
    13711371  public function write_modprobe() { 
    13721372        global $amp_conf; 
    1373     global $dahdi_ge_260; 
     1373     
     1374    $dahdi_ge_260 = version_compare(dahdiconfig_getinfo('version'),'2.6.0','ge'); 
    13741375    $file = $amp_conf['DAHDIMODPROBELOC']; 
    13751376         
     
    13951396             
    13961397            $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') { 
    13981399          unset($opts['ringdetect']); 
    13991400        } 
  • modules/branches/2.11/dahdiconfig/module.xml

    r15387 r15393  
    44  <category>Connectivity</category> 
    55  <name>DAHDi Config</name> 
    6   <version>2.11.20</version> 
     6  <version>2.11.21</version> 
    77  <publisher>Schmoozecom</publisher> 
    88  <license>GPLv2</license> 
     
    1010  <canuninstall>yes</canuninstall> 
    1111  <changelog> 
     12    *2.11.21* Fixes #6434,#6436 (only show fwringer of module is wctdm) added italian re #6361 
    1213    *2.11.20* Fixes #6420 dont allow usage of fwringdetect in 2.6.0 and greater 
    1314    *2.11.19* Add sangoma GSM card control and setup 
  • modules/branches/2.11/dahdiconfig/page.dahdi.php

    r15382 r15393  
    1313    } 
    1414} 
     15 
     16$dahdi_info = dahdiconfig_getinfo(); 
     17$dahdi_ge_260 = version_compare(dahdiconfig_getinfo('version'),'2.6.0','ge'); 
    1518 
    1619//Check to make sure dahdi is running. Display an error if it's not 
     
    266269                    $('#mp_setting_origsetting_key_0').val('') 
    267270                     
     271          if(j.module == "wctdm") { 
     272            $('#tr_ringdetect').show(); 
     273          } else { 
     274            $('#tr_ringdetect').hide(); 
     275          } 
     276           
    268277                    if(j.module == "wctc4xxp") {  
    269278                        $('#normal_mp_settings').hide(); 
     
    326335            }) 
    327336        } else { 
     337      if($(this).val() == "wctdm") { 
     338        $('#tr_ringdetect').show(); 
     339      } else { 
     340        $('#tr_ringdetect').hide(); 
     341      } 
     342       
    328343            if(($(this).val() == "wct4xxp") || ($(this).val() == "wcte12xp")) { 
    329344                $('#wct4xxp_wcte12xp_settings').show(); 
     345        $('#normal_mp_settings').hide(); 
    330346            } else { 
    331347                $('#wct4xxp_wcte12xp_settings').hide(); 
     348        $('#normal_mp_settings').show(); 
    332349            } 
    333350             
  • modules/branches/2.11/dahdiconfig/views/dahdi_global_settings.php

    r15079 r15393  
    1212                <select id="language" name="language"> 
    1313                  <option value="en">English</option> 
     14          <option value="it">Italian</option> 
    1415              </select> 
    1516            </td> 
  • modules/branches/2.11/dahdiconfig/views/dahdi_modprobe_settings.php

    r15382 r15393  
    177177              </td> 
    178178            </tr> 
    179       <?php if(!$dahdi_ge_260) {?> 
    180             <tr> 
     179            <tr id="tr_ringdetect" style="display:none;"> 
    181180                <td style="width:10px;"> 
    182181                    <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> 
     
    190189                </td> 
    191190            </tr> 
    192       <?php } ?> 
    193191            <tr> 
    194192                <td style="width:10px;">