Changeset 13805

Show
Ignore:
Timestamp:
03/14/12 14:33:02 (1 year ago)
Author:
p_lindheimer
Message:

provide option to leave mailbox= lines as some devices subscribe whether or not they have mailboxes leading to many notices in the logs re #5678

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.10/libfreepbx.install.php

    r13623 r13805  
    20432043  $set['sortorder'] = 12; 
    20442044  $freepbx_conf->define_conf_setting('DEVICE_STRONG_SECRETS',$set); 
     2045 
     2046  // DEVICE_REMOVE_MAILBOX 
     2047  $set['value'] = false; 
     2048  $set['options'] = ''; 
     2049  $set['name'] = 'Remove mailbox Setting when no Voicemail'; 
     2050  $set['description'] = 'If set to true, any fixed device associated with a user that has no voicemail configured will have the "mailbox=" setting removed in the generated technology configuration file such as sip_additional.conf. This will not affect the value in the GUI.'; 
     2051  $set['readonly'] = 0; 
     2052  $set['type'] = CONF_TYPE_BOOL; 
     2053  $set['emptyok'] = 0; 
     2054  $set['sortorder'] = 15; 
     2055  $freepbx_conf->define_conf_setting('DEVICE_REMOVE_MAILBOX',$set); 
    20452056 
    20462057  // DEVICE_SIP_CANREINVITE 
  • modules/branches/2.10/core/functions.inc.php

    r13804 r13805  
    3333  // map the actual vmcontext and user devicename if the device is fixed 
    3434  private function map_dev_user($account, $keyword, $data) { 
     35    global $amp_conf; 
    3536 
    3637    if (!isset($this->dev_user_map)) { 
     
    4546        case 'mailbox': 
    4647          if ((empty($this->dev_user_map[$account]['vmcontext']) || $this->dev_user_map[$account]['vmcontext'] == 'novm')  
    47             && strtolower($data) == "$account" . "@device") { 
     48            && strtolower($data) == "$account" . "@device" && $amp_conf['DEVICE_REMOVE_MAILBOX']) { 
    4849            // they have no vm so don't put a mailbox=line 
    4950            return "";