Changeset 7124

Show
Ignore:
Timestamp:
10/24/08 11:12:54 (3 years ago)
Author:
p_lindheimer
Message:

closes #3321 adds GUI support for pinless dialing

Files:

Legend:

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

    r7101 r7124  
    28412841    } 
    28422842 
     2843    if (trim($pinless) == 'enabled') { 
     2844      $astman->database_put("AMPUSER",$extension."/pinless","\"NOPASSWD\""); 
     2845    } else if (trim($pinless) == 'disabled') { 
     2846      $astman->database_del("AMPUSER",$extension."/pinless"); 
     2847    } else { 
     2848      echo "ERROR: this state should not exist<br>"; 
     2849    } 
     2850 
    28432851    // Moved VmX setup to voicemail module since it is part of voicemail 
    28442852    // 
     
    29082916    $call_screen=$astman->database_get("AMPUSER",$extension."/screen"); 
    29092917    $results['call_screen'] = (trim($call_screen) != "")?$call_screen:'0'; 
     2918 
     2919    $pinless=$astman->database_get("AMPUSER",$extension."/pinless"); 
     2920    $results['pinless'] = (trim($pinless) == 'NOPASSWD') ? 'enabled' : 'disabled'; 
    29102921  } else { 
    29112922    fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]); 
     
    42384249    $currentcomponent->setoptlistopts('callwaiting', 'sort', false); 
    42394250 
     4251    $currentcomponent->addoptlistitem('pinless', 'disabled', _("Disable")); 
     4252    $currentcomponent->addoptlistitem('pinless', 'enabled', _("Enable")); 
     4253    $currentcomponent->setoptlistopts('pinless', 'sort', false); 
     4254 
    42404255    $currentcomponent->addoptlistitem('call_screen', '0', _("Disable")); 
    42414256    $currentcomponent->addoptlistitem('call_screen', 'nomemory', _("Screen Caller: No Memory")); 
     
    44164431    $currentcomponent->addguielem($section, new gui_selectbox('callwaiting', $currentcomponent->getoptlist('callwaiting'), $callwaiting, _("Call Waiting"), _("Set the initial/current Call Waiting state for this user's extension"), false)); 
    44174432    $currentcomponent->addguielem($section, new gui_selectbox('call_screen', $currentcomponent->getoptlist('call_screen'), $call_screen, _("Call Screening"),_("Call Screening requires external callers to 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 caller for their caller-id once. Screening without memory always requires a caller to say their name. Either mode will always announce the caller based on the last introduction saved with that callerid. If any user on the system uses the memory option, when that user is called, the caller will be required to re-introduce themselves and all users on the system will have that new introduction associated with the caller's CallerId."), false)); 
     4433    $currentcomponent->addguielem($section, new gui_selectbox('pinless', $currentcomponent->getoptlist('pinless'), $pinless, _("Pinless Dialing"), _("Enabling Pinless Dialing will allow this extension to bypass any pin codes normally required on outbound calls"), false)); 
    44184434 
    44194435    $section = _("Assigned DID/CID");