Asterisk cmd PrivacyManager
Synopsis:
Require phone number to be entered, if no CallerID sentDescription:
PrivacyManagerIf no Caller*ID is sent, PrivacyManager answers the channel and asks the caller to enter their 10 digit phone number. The caller is given 3 attempts. If after 3 attempts, they do not enter their 10 digit phone number, and if there exists a priority n + 101, where 'n' is the priority of the current instance, then the channel will be setup to continue at that priority level. Otherwise, it returns 0. Does nothing if Caller*ID was received on the channel.
New (July 2005): bug 752 was included in CVS (Asterisk 1.1) and enhances the privacy manager considerably. As part of this patch, the 'n' flag to Dial got changed to be used as part of the privacy features, instead of being the 'dont jump to +101' flag. That flag is now 'j'.
2005-03-30: Calls go through the PrivacyManager when the Caller*ID is set to anything at all (such as 'anonymous'). This simple patch makes sure the Caller*ID contains a telephone number before deciding what to do. Code is based on similar stuff in chan_zap.c
--- app_privacy.c.orig 2005-03-29 15:49:07.000000000 -0500
+++ app_privacy.c 2005-03-29 16:09:18.000000000 -0500
@@ -58,12 +58,18 @@
char *s;
char phone10;
char new_cid144;
+ char *l=NULL,*n=NULL;
struct localuser *u;
struct ast_config *cfg;
LOCAL_USER_ADD (u);
if (chan->callerid)
{
+ ast_callerid_parse(chan->callerid, &n, &l);
+ if (l) ast_shrink_phone_number(l);
+ }
+ if (l && ast_isphonenumber(l))
+ {
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "CallerID Present: Skipping\n");
}
See also:
Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ

Comments
333Re: North American Centric
333Patch breaks good callerid name
333anonymous callers
PrivacyManager will pass the call if _anything_ has been sent for the callerid value, including "anonymous" and no telephone number.
333North American Centric