B.86. PrivacyManager()

Requests the input of the caller's telephone number, if caller ID cannot be obtained.
If no caller ID is received, the channel is answered and the caller is asked to enter his own telephone number. If caller ID is present on the line, PrivacyManager() has no effect.
The caller has maxRetries (default is 3) number of attempts to provide a valid number of at least minLength (default is 10) digits in length. The default values are set in privacy.conf, which may contain the following entries:
The maximum number of times the caller can attempt to enter a number complying with the length limit set by minLength (usually 3).
The minimum number of digits a number entered must have to be accepted (usually 10).
If you want to prevent PrivacyManager() from reading from the configuration file every time it is called, you can set values in the command in the dialplan.
If option j is set, it jumps to n+101 if the caller fails to provide a valid number within the number of allowed attempts.
The channel variable PRIVACYMGRSTATUS is set to SUCCESS or FAILED and indicates whether the privacy manager was able to get a valid phone number from the caller.
exten => 123,1,Answer()
exten => 123,n,PrivacyManager()
exten => 123,n,GotoIf($["${PRIVACYMGRSTATUS}" = "FAILED"]?pm-failed,1)
exten => 123,n,Dial(Zap/1)

exten => pm-failed,1,Playback(sorry)
exten => pm-failed,n,Playback(vm-goodbye)


Internal help for this application in Asterisk 1.4:
  -= Info about application 'PrivacyManager' =- 

Require phone number to be entered, if no CallerID sent

  PrivacyManager([maxretries[|minlength[|options]]]): If no Caller*ID 
is sent, PrivacyManager answers the channel and asks the caller to
enter their phone number. The caller is given 3 attempts to do so.
The application does nothing if Caller*ID was received on the channel.
  Configuration file privacy.conf contains two variables:
   maxretries  default 3  -maximum number of attempts the caller is allowed 
               to input a callerid.
   minlength   default 10 -minimum allowable digits in the input callerid number.
If you don't want to use the config file and have an i/o operation with
every call, you can also specify maxretries and minlength as application
parameters. Doing so supercedes any values set in privacy.conf.
The option string may contain the following character: 
  'j' -- jump to n+101 priority after <maxretries> failed attempts to collect
         the minlength number of digits.
The application sets the following channel variable upon completion: 
PRIVACYMGRSTATUS  The status of the privacy manager's attempt to collect 
                  a phone number from the user. A text string that is either:
          SUCCESS | FAILED
diff output to internal help in Asterisk 1.2:
- none -