login | register
Tue 30 of Sep, 2008 [23:43 UTC]

voip-info.org

Discuss [4] History

Asterisk cmd PrivacyManager

Created by: oej,Last modification on Fri 12 of Oct, 2007 [07:39 UTC] by chandave

Synopsis:

Require phone number to be entered, if no CallerID sent

Description:

 PrivacyManager

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 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

Comments Filter
222

333Re: North American Centric

by arivanov, Monday 27 of March, 2006 [20:32:45 UTC]
It is, but only in recent asterisks. Have a look at the current app_privacy source. It supports maxlength as well as retries as configurable parameters.
222

333Patch breaks good callerid name

by ctgray1, Tuesday 31 of January, 2006 [17:06:27 UTC]
The posted patch works great on anonymous or otherwise bad callerid, but it breaks good calleridname. You get the number, but name is empty.
222

333anonymous callers

by X1Z, Monday 28 of March, 2005 [23:49:14 UTC]

PrivacyManager will pass the call if _anything_ has been sent for the callerid value, including "anonymous" and no telephone number.


222

333North American Centric

by , Saturday 17 of July, 2004 [08:29:14 UTC]
Should be configurable as to how many digits it asks for...