Changeset 8832
- Timestamp:
- 02/16/10 13:43:19 (3 years ago)
- Files:
-
- modules/branches/2.7/core/agi-bin/user_login_out.agi (modified) (6 diffs)
- modules/branches/2.7/core/module.xml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.7/core/agi-bin/user_login_out.agi
r8470 r8832 48 48 $ast_version = get_var("ASTVERSION"); 49 49 $dnd_devstate = get_var( "DNDDEVSTATE" ) == "TRUE" ? true : false; 50 $cf_devstate = get_var( "CFDEVSTATE" ) == "TRUE" ? true : false; 50 51 $fm_devstate = get_var( "FMDEVSTATE" ) == "TRUE" ? true : false; 51 52 $que_devstate = get_var( "QUEDEVSTATE" ) == "TRUE" ? true : false; … … 162 163 global $fm_devstate; 163 164 global $dnd_devstate; 165 global $cf_devstate; 164 166 global $que_devstate; 165 167 global $DEVSTATE; … … 193 195 $agi->set_variable($DEVSTATE.'(Custom:DEVDND'.$device.')',get_dnd_state($user)); 194 196 } 197 if ($cf_devstate) { 198 debug("insert_user: Setting CF DEVSTATES for device $device",5); 199 $agi->set_variable($DEVSTATE.'(Custom:DEVCF'.$device.')',get_cf_state($user)); 200 } 195 201 196 202 $vmcontext = get_voicemail_context($user); … … 212 218 global $fm_devstate; 213 219 global $dnd_devstate; 220 global $cf_devstate; 214 221 global $que_devstate; 215 222 global $DEVSTATE; … … 246 253 if ($dnd_devstate) { 247 254 debug("Setting device $device DND state to INVALID before deleting",5); 248 $agi->set_variable($DEVSTATE.'(Custom:DEVDND'.$device.')','INVALID'); 255 $agi->set_variable($DEVSTATE.'(Custom:DEVDND'.$device.')','UNKNOWN'); 256 } 257 if ($cf_devstate) { 258 debug("Setting device $device CF state to INVALID before deleting",5); 259 $agi->set_variable($DEVSTATE.'(Custom:DEVCF'.$device.')','UNKNOWN'); 249 260 } 250 261 // I thought they should then be deleted, but they still end up there probably because setting them to invalid re-creates them … … 444 455 } 445 456 debug("get_dnd_state: user $user got state ".$dnd_state['data']." returning $ret",8); 457 return $ret; 458 } 459 460 function get_cf_state($user) { 461 global $agi; 462 463 $cf_state = $agi->database_get('CF',$user); 464 if ($cf_state['result'] != 1) { 465 $ret = 'NOT_INUSE'; 466 } else { 467 if (trim($cf_state['data']) == '') { 468 $ret = 'NOT_INUSE'; 469 } else { 470 $ret = 'INUSE'; 471 } 472 } 473 debug("get_cf_state: user $user got state ".$cf_state['data']." returning $ret",8); 446 474 return $ret; 447 475 } modules/branches/2.7/core/module.xml
r8813 r8832 4 4 <category>Basic</category> 5 5 <name>Core</name> 6 <version>2.7.0beta1. 4</version>6 <version>2.7.0beta1.5</version> 7 7 <publisher>FreePBX</publisher> 8 8 <license>GPLv2+</license> … … 10 10 <canuninstall>no</canuninstall> 11 11 <changelog> 12 *2.7.0beta1.5* #4047 changes to support CF devstate in deviceanduser mode 12 13 *2.7.0beta1.4* #4041 13 14 *2.7.0beta1.3* #4037
