Changeset 5901

Show
Ignore:
Timestamp:
07/04/08 06:46:44 (5 months ago)
Author:
p_lindheimer
Message:

forgot to yank fax and privacymanager stuff from users/extensions gui, also modified zapata_additional.conf generation to keep bogus configuration variables out of conf file

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.5/core/functions.inc.php

    r5900 r5901  
    408408                        $zapchannel=""; 
    409409                        foreach ($results2 as $result2) { 
    410                                 if ($result2['keyword'] == 'channel') { 
    411                                         $zapchannel = $result2['data']; 
    412                                 } else { 
    413                                         $output .= $result2['keyword']."=".$result2['data']."\n"; 
     410                                switch ($result2['keyword']) { 
     411                                        case 'channel': 
     412                                                $zapchannel = $result2['data']; 
     413                                                break; 
     414 
     415                                        // These are not zapata.conf variables so keep out of file 
     416                                        case 'record_out': 
     417                                        case 'record_in': 
     418                                        case 'dial': 
     419                                                break; 
     420                                        default: 
     421                                                $output .= $result2['keyword']."=".$result2['data']."\n"; 
    414422                                } 
    415423                        } 
     
    38293837                $currentcomponent->setoptlistopts('recordoptions', 'sort', false); 
    38303838 
    3831                 $currentcomponent->addoptlistitem('faxdetecttype', '0', _("None")); 
    3832                 $currentcomponent->addoptlistitem('faxdetecttype', '1', 'Zaptel'); 
    3833                 $currentcomponent->addoptlistitem('faxdetecttype', '2', 'NVFax'); 
    3834                 $currentcomponent->setoptlistopts('faxdetecttype', 'sort', false); 
    3835  
    3836                $currentcomponent->addoptlistitem('privoptions', '0', _("Off")); 
    3837                $currentcomponent->addoptlistitem('privoptions', '1', _("Require Caller ID")); 
    3838                $currentcomponent->addoptlistitem('privoptions', '2', _("Screen Caller - No Memory")); 
    3839                $currentcomponent->addoptlistitem('privoptions', '3', _("Screen Caller - Memory")); 
    3840                $currentcomponent->setoptlistopts('privoptions', 'sort', false); 
    3841  
    38423839                $currentcomponent->addoptlistitem('callwaiting', 'enabled', _("Enable")); 
    38433840                $currentcomponent->addoptlistitem('callwaiting', 'disabled', _("Disable")); 
     
    38493846                } 
    38503847                $currentcomponent->setoptlistopts('ringtime', 'sort', false); 
    3851  
    3852                 $currentcomponent->addoptlistitem('faxdestoptions', 'default', _("FreePBX default")); 
    3853                 $currentcomponent->addoptlistitem('faxdestoptions', 'disabled', _("disabled")); 
    3854                 $currentcomponent->addoptlistitem('faxdestoptions', 'system', _("system")); 
    3855                 $currentcomponent->setoptlistopts('faxdestoptions', 'sort', false); 
    3856  
    3857                 if (function_exists('music_list')) { 
    3858                                 $tresults = music_list($amp_conf['ASTVARLIBDIR']."/mohmp3"); 
    3859                     if (isset($tresults[0])) { 
    3860                         foreach ($tresults as $tresult) { 
    3861                             $currentcomponent->addoptlistitem('mohclass', $tresult, $tresult); 
    3862                         } 
    3863                     $currentcomponent->setoptlistopts('mohclass', 'sort', false); 
    3864                     } 
    3865                 } 
    3866  
    3867                 //get unique devices to finishoff faxdestoptions list 
    3868                 $devices = core_devices_list(); 
    3869                 if (isset($devices)) { 
    3870                         foreach ($devices as $device) { 
    3871                                 $currentcomponent->addoptlistitem('faxdestoptions', $device[0], "$device[1] <$device[0]>"); 
    3872                         } 
    3873                 } 
    38743848 
    38753849                // Add the 'proces' functions 
     
    40604034                $currentcomponent->addguielem($section, new gui_selectbox('record_in', $currentcomponent->getoptlist('recordoptions'), $record_in, 'Record Incoming', _("Record all inbound calls received at this extension."), false)); 
    40614035                $currentcomponent->addguielem($section, new gui_selectbox('record_out', $currentcomponent->getoptlist('recordoptions'), $record_out, 'Record Outgoing', _("Record all outbound calls received at this extension."), false)); 
    4062  
    4063                 $section = 'Fax Handling'; 
    4064                 $wait = (isset($wait) ? $wait : '0'); 
    4065                 $currentcomponent->addguielem($section, new gui_selectbox('faxexten', $currentcomponent->getoptlist('faxdestoptions'), $faxexten, 'Fax Extension', _("Select 'system' to have the system receive and email faxes.<br><br>The FreePBX default is defined in General Settings."), false), 4); 
    4066                 $currentcomponent->addguielem($section, new gui_textbox('faxemail', $faxemail, 'Fax Email', _("Email address is used if 'system' has been chosen for the fax extension above.<br><br>Leave this blank to use the FreePBX default in General Settings"))); 
    4067                 $currentcomponent->addguielem($section, new gui_selectbox('answer', $currentcomponent->getoptlist('faxdetecttype'), $answer, 'Fax Detection Type', _("Selecting Zaptel or NVFax will immediately answer the call and play ringing tones to the caller for the number of seconds in Pause below. Use NVFax on SIP or IAX trunks."), false)); 
    4068                 $currentcomponent->addguielem($section, new gui_textbox('wait', $wait, 'Pause after answer', _("The number of seconds we should wait after performing an Immediate Answer. The primary purpose of this is to pause and listen for a fax tone before allowing the call to proceed."), '!isInteger()', $msgInvalidPause, false)); 
    4069  
    4070                 $section = 'Privacy'; 
    4071                 $privacyman = (isset($privacyman) ? $privacyman : '0'); 
    4072                 $currentcomponent->addguielem($section, new gui_selectbox('privacyman', $currentcomponent->getoptlist('privoptions'), $privacyman, 'Privacy Manager',_("Choose 'Require Caller ID' and If no Caller ID is sent, Privacy Manager will asks the caller to enter their 10 digit phone number. The caller is given 3 attempts.  If 'Screen Caller' is chosen, the caller must say their name, which will be played back to the user and allow the user to accept or reject the call.  Screening with memory only verifies a user for their caller-id once.  Screening without memory always requires a caller to say their name."), false), 4); 
    4073  
    40744036        } 
    40754037} 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads