Asterisk cmd PrivacyManager


Require phone number to be entered, if no CallerID sent



If 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 phone[10];
char new_cid[144];
+ char *l=NULL,*n=NULL;
struct localuser *u;
struct ast_config *cfg;

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

Created by: oej, Last modification: Mon 11 of Jun, 2012 (05:36 UTC) by admin
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+