Changeset 3627

Show
Ignore:
Timestamp:
01/24/07 15:07:40 (5 years ago)
Author:
p_lindheimer
Message:

added support to enable/disable VmX Locator (personal ivr tied to voicemail)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.3/voicemail/functions.inc.php

    r3361 r3627  
    7676  $tech_hardware = isset($_REQUEST['tech_hardware'])?$_REQUEST['tech_hardware']:null; 
    7777 
    78  
    7978       // We only want to hook 'users' or 'extensions' pages.  
    8079  if ($pagename != 'users' && $pagename != 'extensions')   
     
    107106  $currentcomponent->addoptlistitem('vmena', 'disabled', 'Disabled'); 
    108107  $currentcomponent->setoptlistopts('vmena', 'sort', false); 
     108  // Enable / Disable vmx list 
     109  $currentcomponent->addoptlistitem('vmxena', '', 'Disabled'); 
     110  $currentcomponent->addoptlistitem('vmxena', 'checked', 'Enabled'); 
     111  $currentcomponent->setoptlistopts('vmxena', 'sort', false); 
    109112  // Yes / No Radio button list 
    110113  $currentcomponent->addoptlistitem('vmyn', 'yes', 'yes'); 
     
    125128  $extn = isset($_REQUEST['extension'])?$_REQUEST['extension']:null; 
    126129  $display = isset($_REQUEST['display'])?$_REQUEST['display']:null; 
    127    
     130 
    128131  if ($ext==='') { 
    129132    $extdisplay = $extn; 
     
    131134    $extdisplay = $ext; 
    132135  } 
     136 
     137 
    133138  if ($action != 'del') { 
    134139    $vmbox = voicemail_mailbox_get($extdisplay); 
     
    141146      $pager = null; 
    142147      $vmoptions = null; 
     148 
     149      $vmx_state = ''; 
    143150    } else { 
    144151      $incontext = isset($vmbox['vmcontext'])?$vmbox['vmcontext']:'default'; 
     
    149156      $vmoptions = $vmbox['options']; 
    150157      $vm = true; 
     158 
     159      $vmx_state = voicemail_vmxGet($extdisplay); 
    151160    } 
    152161 
     
    205214    $currentcomponent->addguielem($section, new gui_textbox('options', $options, 'vm options', 'Separate options with pipe ( | )<br><br>ie: review=yes|maxmessage=60')); 
    206215    $currentcomponent->addguielem($section, new gui_textbox('vmcontext', $vmcontext, 'vm context', '', "frm_${display}_isVoiceMailEnabled() && isEmpty()", $msgInvalidVMContext, false)); 
     216    $currentcomponent->addguielem($section, new gui_selectbox('vmx_state', $currentcomponent->getoptlist('vmxena'), $vmx_state, 'VmX IVR', 'Enable/Disable the Extended Voicemail IVR ability on this extension. Defaults will be set an d the user can make changes in the ARI or equivalent portal. Unchecking will disabled the feature but not delete any existing settings', false)); 
    207217  } 
    208218} 
     
    330340} 
    331341 
     342function voicemail_vmxGet($extension) { 
     343  global $astman;                                                                                                                                                                                                     
     344                                                                                                                                                                                                                          
     345  // Retrieve the state 
     346  $vmx_state=$astman->database_get("AMPUSER",$extension."/vmx/unavail/state"); 
     347  if (isset($vmx_state) && (trim($vmx_state) == 'enabled' || trim($vmx_state) == 'disabled')) { 
     348    $vmx_state='checked'; 
     349  } else { 
     350    $vmx_state=''; 
     351  } 
     352 
     353  return $vmx_state; 
     354}                                                                                                                                                                                                                     
     355 
     356 
    332357?> 
  • modules/branches/2.3/voicemail/module.xml

    r3362 r3627  
    22  <rawname>voicemail</rawname> 
    33  <name>Voicemail</name> 
    4   <version>1.6</version> 
     4  <version>1.6.1</version> 
    55  <changelog> 
    6             *1.6* Re-Fix 1.5.2, bump version for 2.2rc2 release. 
     6      *1.6.1* Added support to enable/disable VmX Locator (personal ivr) 
     7      *1.6* Re-Fix 1.5.2, bump version for 2.2rc2 release. 
    78      *1.5.3* Fix for vm Javascript sanity checks only working in DevAndUser mode. 
    89      *1.5.2* Fix vm not appearing in DeviceAndUser mode