Changeset 11328
- Timestamp:
- 02/09/11 04:16:17 (2 years ago)
- Files:
-
- modules/branches/2.8 (modified) (1 prop)
- modules/branches/2.8/directory/agi-bin/directory.agi (modified) (1 diff)
- modules/branches/2.8/directory/agi-bin/directory.lib.php (modified) (7 diffs)
- modules/branches/2.8/directory/functions.inc.php (modified) (1 diff)
- modules/branches/2.8/directory/module.xml (modified) (2 diffs)
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 120 120 function call($contact){ 121 121 global $dir; 122 $dir->readContact($contact ,$validkeys,0);122 $dir->readContact($contact); 123 123 if($dir->dir['alert_info'] != ''){ 124 124 $dir->agi->set_alertinfo($dir->dir['alert_info']); modules/branches/2.8/directory/agi-bin/directory.lib.php
r9923 r11328 86 86 87 87 //get options associated with the current dir 88 // TODO: handle getRow failures88 // TODO: handle getRow failures 89 89 function __construct_dir_opts(){ 90 90 $sql='SELECT * FROM directory_details WHERE ID = ?'; … … 93 93 94 94 //If any non-defaults (non-zero id) then lookup files 95 //95 // 96 96 if ($row['announcement'] || $row['repeat_recording'] || $row['invalid_recording']) { 97 97 $sql='SELECT id, filename from recordings where id in ('.$row['announcement'].','.$row['repeat_recording'].','.$row['invalid_recording'].')'; … … 154 154 } 155 155 156 function readContact($con, $keys=''){156 function readContact($con, $keys='#'){ 157 157 switch($con['audio']){ 158 158 case 'vm': … … 160 160 $vm_dir = $this->agi->database_get('AMPUSER',$con['dial'].'/voicemail'); 161 161 $vm_dir = $vm_dir['data']; 162 d ebug("got directory $vm_dir for user {$con['dial']}",6);162 dbug('got directory ' . $vm_dir . ' for user ' . $con['dial']); 163 163 164 164 //check to see if we have a greet.* and play it. otherwise, fallback to spelling the name … … 171 171 foreach($dir as $file){ 172 172 debug("looking for vm file $file using: ".basename($file),6); 173 173 174 if(substr($file,0,5) == 'greet' && is_file($this->vmbasedir.$vm_dir.'/'.$con['dial'].'/'.$file)){ 174 175 $ret=$this->agi->stream_file($this->vmbasedir.$vm_dir.'/'.$con['dial'].'/greet',$keys); … … 180 181 //fallthough if not successfull 181 182 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'])); 183 185 switch(true){ 184 186 case ctype_alpha($char): 185 $ret =$this->agi->evaluate('SAY ALPHA '.$char.' '.$keys);187 $ret = $this->agi->evaluate('SAY ALPHA '.$char.' '.$keys); 186 188 debug("returned from SAY ALPHA with code/result {$ret['code']}/{$ret['result']}",6); 187 189 break; 188 190 case ctype_digit($char): 189 $ret =$this->agi->say_digits($char, $keys);191 $ret = $this->agi->say_digits($char, $keys); 190 192 break; 191 193 case ctype_space($char)://pause 192 $ret =$this->agi->wait_for_digit(750);194 $ret = $this->agi->wait_for_digit(750); 193 195 break; 194 196 } … … 235 237 $this->searchstring=$this->db->escapeSimple(str_replace($num,$alph,$key)); 236 238 debug("search string for regex: {$this->searchstring}",6); 239 237 240 238 241 //TODO: check db results for errors and fail gracefully modules/branches/2.8/directory/functions.inc.php
r9897 r11328 530 530 } 531 531 } 532 533 532 ?> modules/branches/2.8/directory/module.xml
r11153 r11328 2 2 <rawname>directory</rawname> 3 3 <name>Directory</name> 4 <version>2.8.0. 2</version>4 <version>2.8.0.3</version> 5 5 <publisher>Schmoozecom.com</publisher> 6 6 <license>GPLv2+</license> … … 15 15 </depends> 16 16 <changelog> 17 *2.8.0.3* #4750 17 18 *2.8.0.2* #4591 18 19 *2.8.0.1* #4614
