Does anyone know where I can find more info on the privacy database used in Dial() with option P ?
I would like to exclude some extensions from getting calls from some CIDs.
A small patch to dialparties.agi solves the problem:
--- dialparties.agi.old 2009-12-30 13:05:30.000000000 -0800
+++ dialparties.agi 2010-03-21 21:35:46.000000000 -0700
@@ -194,6 +194,15 @@
}
$extarray = split( '-', $arg );
foreach ( $extarray as $k ) {
+ if ($cidnum == $k ) {
+ debug("Skipping extension $k",3);
+ continue;
+ }
+ $pcids = $AGI->database_get('PRIVACY', $k);
+ if (strpos($pcids["data"], $cidnum) !== FALSE) {
+ debug("Skipping extension $k",3);
+ continue;
+ }
$ext[] = $k;
debug("Added extension $k to extension map", 3);
}
Now I can add CIDs into the database with multiple CIDs per extension, eg:
database put PRIVACY 701 “+17475551234-5416858773-8001231234”
this also avoids calls to originating extension when dialing call groups
This obviously is a FreePBX patch. I simply did not know at the time about all the ingredients involved in an average Asterisk based distro.