Changeset 13467 for modules

Show
Ignore:
Timestamp:
02/17/12 16:57:04 (1 year ago)
Author:
p_lindheimer
Message:

closes #5551 only play initial 'welcome-to-the-directory' when the default annoucement is specified so we don't potentially mix voices if custom recordings are used

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.10/directory/agi-bin/directory.agi

    r12726 r13467  
    44$loopcounter1=$loopcounter2=0; 
    55$matches=false; 
    6 $search=array(); 
     6$search=array('result' => ''); 
    77$dir=new Dir(); 
    88$matches = false; 
     
    2222    if ($needs_welcome) { 
    2323      $needs_welcome = false; 
    24       $search = $dir->agi->fastpass_get_data($buffer, 'cdir-welcome',100,3); 
     24      if ($dir->default_annoucement()) { 
     25        $search = $dir->agi->fastpass_get_data($buffer, 'cdir-welcome',100,3); 
     26      } 
    2527      if ((strlen($buffer) < 3) && (strstr($search['result'],'0') === false)) { 
    2628        $search = $dir->agi->fastpass_get_data($buffer, $dir->dir['announcement'],3000,3); 
  • modules/branches/2.10/directory/agi-bin/directory.lib.php

    r13160 r13467  
    2020  //TODO: what is this var for? 
    2121  var $vmbasedir=''; 
     22 
     23  // determine if annoucement is default so we can choose whether or not to play the 
     24  // "welcome-to-the-directory" recording 
     25  var $default_annoucement = false; 
    2226   
    2327  //PHP4 comaptibility constructor 
     
    9599    //TODO: Error Checking 
    96100 
     101    $this->default_annoucement = $row['announcement'] === '0' ? true : false; 
     102 
    97103    //If any non-defaults (non-zero id) then lookup files 
    98104    // 
     
    115121    $row['invalid_recording'] = $row['invalid_recording']&&isset($rec_file[$row['invalid_recording']])?$rec_file[$row['invalid_recording']]:'cdir-transferring-further-assistance'; 
    116122    return $row; 
     123  } 
     124 
     125  function default_annoucement() { 
     126    return $this->default_annoucement; 
    117127  } 
    118128