Changeset 11328

Show
Ignore:
Timestamp:
02/09/11 04:16:17 (2 years ago)
Author:
mbrevda
Message:

re #4750 - fix to make asterisk 1.8 happy

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.8

    • Property svnmerge-integrated changed from /modules/branches/2.7:1-9074,9105,10001,10196,10253,10264,10295,10355,10399-10422,10424-10426,10428-10430,10432-10433,10436-10458,10628,10802,10816,10823,10869,10875-10876 /modules/branches/2.9:1-10122,10411-10428,10430-10440,10442-10444,10447,10449-10451,10453-10510,10512-10526,10529-10533,10536-10539,10542-10543,10545-10549,10556-10564,10572-10576,10578-10581,10597-10599,10602,10605,10607,10611,10658,10690,10771,11295 to /modules/branches/2.9:1-10122,10411-10428,10430-10440,10442-10444,10447,10449-10451,10453-10510,10512-10526,10529-10533,10536-10539,10542-10543,10545-10549,10556-10564,10572-10576,10578-10581,10597-10599,10602,10605,10607,10611,10658,10690,10771,11295,11327 /modules/branches/2.7:1-9074,9105,10001,10196,10253,10264,10295,10355,10399-10422,10424-10426,10428-10430,10432-10433,10436-10458,10628,10802,10816,10823,10869,10875-10876
  • modules/branches/2.8/directory/agi-bin/directory.agi

    r11049 r11328  
    120120function call($contact){ 
    121121  global $dir; 
    122   $dir->readContact($contact,$validkeys,0); 
     122  $dir->readContact($contact); 
    123123  if($dir->dir['alert_info'] != ''){ 
    124124    $dir->agi->set_alertinfo($dir->dir['alert_info']); 
  • modules/branches/2.8/directory/agi-bin/directory.lib.php

    r9923 r11328  
    8686   
    8787  //get options associated with the current dir 
    88   // TODO: handle getRow failures 
     88   // TODO: handle getRow failures 
    8989  function __construct_dir_opts(){ 
    9090    $sql='SELECT * FROM directory_details WHERE ID = ?'; 
     
    9393 
    9494    //If any non-defaults (non-zero id) then lookup files 
    95     // 
     95     // 
    9696    if ($row['announcement'] || $row['repeat_recording'] || $row['invalid_recording']) { 
    9797      $sql='SELECT id, filename from recordings where id in ('.$row['announcement'].','.$row['repeat_recording'].','.$row['invalid_recording'].')'; 
     
    154154  } 
    155155   
    156   function readContact($con,$keys=''){ 
     156  function readContact($con, $keys='#'){ 
    157157    switch($con['audio']){ 
    158158      case 'vm': 
     
    160160        $vm_dir = $this->agi->database_get('AMPUSER',$con['dial'].'/voicemail'); 
    161161        $vm_dir = $vm_dir['data']; 
    162         debug("got directory $vm_dir for user {$con['dial']}",6); 
     162        dbug('got directory ' . $vm_dir . ' for user ' . $con['dial']); 
    163163 
    164164        //check to see if we have a greet.* and play it. otherwise, fallback to spelling the name 
     
    171171          foreach($dir as $file){ 
    172172            debug("looking for vm file $file using: ".basename($file),6); 
     173 
    173174            if(substr($file,0,5) == 'greet' && is_file($this->vmbasedir.$vm_dir.'/'.$con['dial'].'/'.$file)){ 
    174175              $ret=$this->agi->stream_file($this->vmbasedir.$vm_dir.'/'.$con['dial'].'/greet',$keys); 
     
    180181        //fallthough if not successfull 
    181182      case 'spell': 
    182         foreach(str_split($con['name'],1) as $char){ 
     183        foreach(str_split(strtolower($con['name']),1) as $char){ 
     184          dbug('saying '.$char.' from string '.strtolower($con['name'])); 
    183185          switch(true){ 
    184186            case ctype_alpha($char): 
    185               $ret=$this->agi->evaluate('SAY ALPHA '.$char.' '.$keys); 
     187              $ret = $this->agi->evaluate('SAY ALPHA '.$char.' '.$keys); 
    186188              debug("returned from SAY ALPHA with code/result {$ret['code']}/{$ret['result']}",6); 
    187189            break; 
    188190            case ctype_digit($char): 
    189               $ret=$this->agi->say_digits($char, $keys); 
     191              $ret = $this->agi->say_digits($char, $keys); 
    190192            break; 
    191193            case ctype_space($char)://pause 
    192               $ret=$this->agi->wait_for_digit(750); 
     194              $ret = $this->agi->wait_for_digit(750); 
    193195            break;           
    194196          } 
     
    235237    $this->searchstring=$this->db->escapeSimple(str_replace($num,$alph,$key)); 
    236238    debug("search string for regex: {$this->searchstring}",6); 
     239 
    237240 
    238241    //TODO: check db results for errors and fail gracefully 
  • modules/branches/2.8/directory/functions.inc.php

    r9897 r11328  
    530530  } 
    531531} 
    532  
    533532?> 
  • modules/branches/2.8/directory/module.xml

    r11153 r11328  
    22  <rawname>directory</rawname> 
    33  <name>Directory</name> 
    4   <version>2.8.0.2</version> 
     4  <version>2.8.0.3</version> 
    55  <publisher>Schmoozecom.com</publisher> 
    66  <license>GPLv2+</license> 
     
    1515  </depends> 
    1616  <changelog> 
     17  *2.8.0.3* #4750 
    1718  *2.8.0.2* #4591 
    1819  *2.8.0.1* #4614