Changeset 5895
- Timestamp:
- 07/03/08 17:00:33 (5 years ago)
- Files:
-
- modules/branches/2.5/core/agi-bin/dialparties.agi (modified) (2 diffs)
- modules/branches/2.5/core/etc/extensions.conf (modified) (2 diffs)
- modules/branches/2.5/core/functions.inc.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.5/core/agi-bin/dialparties.agi
r5364 r5895 215 215 debug("ringallv2 ring times: REALPRERING: $fmgrp_realprering, PRERING: $fmgrp_prering",4); 216 216 } 217 217 $already_screened = get_var( $AGI, "SCREEN" ); // If this is the second pass through dialparties.agi, we don't want to double-screen the caller 218 // If this isn't a ring group, check to see if the user has call screening on 219 $count = 0; 220 foreach ($ext as $k) { 221 // Only screen calls if the primary extension is called, or it's follow-me is called, not ring groups 222 if(!$already_screened && $count == 0 && ($rgmethod == "none" || $fmgrp == $k)) { 223 $from_outside = get_var( $AGI, "FROM_DID" ); 224 225 if($from_outside) { // Don't screen internal calls 226 $screen_call = $AGI->database_get('AMPUSER', $k."/screen"); 227 $screen_call = $screen_call['data']; 228 if (strlen($screen_call)) { 229 if($screen_call == "nomemory") { // This can't go in the dialplan because macro-dial can get called multiple times 230 exec("rm -f /var/lib/asterisk/sounds/priv-callerintros/$cidnum.*"); 231 232 } 233 $screen = true; 234 $AGI->set_variable('__SCREEN',$screen_call); 235 $AGI->set_variable('__SCREEN_EXTEN',$k); 236 debug("Extension $k has call screening on", 1); 237 } 238 else { 239 debug("Extension $k has call screening off", 3); 240 } 241 } 242 } 243 $count++; 244 } 218 245 // IF THE FIRST EXTENSION IS CALL FORWARD ENABLED (put in logic) then we don't do master mode 219 246 // which means we reset the flag here after detecting that and just say we are not in master … … 609 636 } 610 637 $ds .= $ds_seperator . $dialopts; // pound to transfer, provide ringing 638 if ($screen) { 639 $ds .= "p"; 640 } 611 641 if (trim($use_confirmation) != "FALSE") { 612 642 $AGI->set_variable('__RG_IDX',$ringgroup_index); modules/branches/2.5/core/etc/extensions.conf
r5741 r5895 73 73 exten => s,n+2(normdial),Dial(${ds}) ; dialparties will set the priority to 10 if $ds is not null 74 74 exten => s,n,Set(DIALSTATUS=${IF($["${DIALSTATUS_CW}"!="" ]?${DIALSTATUS_CW}:${DIALSTATUS})}) 75 exten => s,n,GosubIf($["${SCREEN}" != ""]?${DIALSTATUS},1) 75 76 76 77 exten => s,20(huntdial),NoOp(Returned from dialparties with hunt groups to dial ) … … 107 108 exten => s,n(a50),DBdel(CALLTRACE/${CT_EXTEN}) 108 109 exten => s,n,Goto(s,a42) 110 111 ; For call screening 112 exten => NOANSWER,1(screen-vm),Macro(vm,${SCREEN_EXTEN},BUSY) 113 exten => NOANSWER,n,Macro(hangupcall) 114 exten => TORTURE,1,Goto(app-blackhole,musiconhold,1) 115 exten => TORTURE,n,Macro(hangupcall) 116 exten => DONTCALL,1,Answer 117 exten => DONTCALL,n,Wait(1) 118 exten => DONTCALL,n,Zapateller() 119 exten => DONTCALL,n,Playback(ss-noservice) 120 exten => DONTCALL,n,Macro(hangupcall) 109 121 110 122 ; make sure hungup calls go here so that proper cleanup occurs from call confirmed calls and the like modules/branches/2.5/core/functions.inc.php
r5880 r5895 2011 2011 $astman->database_put("AMPUSER",$extension."/cidname","\"".addslashes($name)."\""); 2012 2012 $astman->database_put("AMPUSER",$extension."/voicemail","\"".$voicemail."\""); 2013 if($privacyman == "0") { 2014 $astman->database_del("AMPUSER",$extension."/screen"); 2015 } 2016 if($privacyman == "2") { 2017 $astman->database_put("AMPUSER",$extension."/screen","\"nomemory\""); 2018 } 2019 if($privacyman == "3") { 2020 $astman->database_put("AMPUSER",$extension."/screen","\"memory\""); 2021 } 2022 2013 2023 } 2014 2024 return true; … … 2522 2532 $astman->database_put("AMPUSER",$extension."/cidnum",$cid_masquerade); 2523 2533 $astman->database_put("AMPUSER",$extension."/voicemail","\"".isset($voicemail)?$voicemail:''."\""); 2534 if($privacyman == "2") { 2535 $astman->database_put("AMPUSER",$extension."/screen","\"nomemory\""); 2536 } 2537 if($privacyman == "3") { 2538 $astman->database_put("AMPUSER",$extension."/screen","\"memory\""); 2539 } 2540 2524 2541 if (!$editmode) { 2525 2542 $astman->database_put("AMPUSER",$extension."/device","\"".((isset($device))?$device:'')."\""); … … 2625 2642 2626 2643 //delete details to astdb 2644 if($astman) { 2645 $astman->database_del("AMPUSER",$extension."/screen"); 2646 } 2627 2647 if ($astman && !$editmode) { 2628 2648 $astman->database_del("AMPUSER",$extension."/password"); … … 3896 3916 $currentcomponent->setoptlistopts('faxdetecttype', 'sort', false); 3897 3917 3898 $currentcomponent->addoptlistitem('privyn', '0', _("No")); 3899 $currentcomponent->addoptlistitem('privyn', '1', _("Yes")); 3900 $currentcomponent->setoptlistopts('privyn', 'sort', false); 3918 $currentcomponent->addoptlistitem('privoptions', '0', _("Off")); 3919 $currentcomponent->addoptlistitem('privoptions', '1', _("Require Caller ID")); 3920 $currentcomponent->addoptlistitem('privoptions', '2', _("Screen Caller - No Memory")); 3921 $currentcomponent->addoptlistitem('privoptions', '3', _("Screen Caller - Memory")); 3922 $currentcomponent->setoptlistopts('privoptions', 'sort', false); 3901 3923 3902 3924 $currentcomponent->addoptlistitem('callwaiting', 'enabled', _("Enable")); … … 4070 4092 $section = 'Privacy'; 4071 4093 $privacyman = (isset($privacyman) ? $privacyman : '0'); 4072 $currentcomponent->addguielem($section, new gui_selectbox('privacyman', $currentcomponent->getoptlist('privyn'), $privacyman, 'Privacy Manager', _("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."), false), 4);4094 $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 4095 4074 4096 }
