Made a simple Call Access Control List application for FusionPBX
Idea is to have a set of rules, that will be match on Caller and Callee number to allow or reject this call.
As an example - simple limit certain extension to call only certain numbers. Or block some callers to call exact this extension.
All is done on regex-like simple patterns.
As an example in screen below, extension 902 (or any number contains 902) can't dial any number, unless it contains 901 (extension 901 as well)
Rules are applied in order.
This app now is a part of my fork of FusionPBX, but fully compatible with vanilla Fusion version 4.4
To install it
# cd /usr/src
# git clone -b 4.4 https://github.com/samael33/fusionpbx.git fusionpbx-samael
# cp -r fusionpbx-samael/app/call_acl /var/www/fusionpbx/app/
# mkdir -p /var/www/fusionpbx/resources/install/scripts/app/custom
# cp -r fusionpbx-samael/resources/install/scripts/app/custom/call_acl /var/www/fusionpbx/resources/install/scripts/app/custom
# cp -r fusionpbx-samael/resources/install/scripts/app/app_custom.lua /var/www/fusionpbx/resources/install/scripts/app/
# cp -r fusionpbx-samael/app/dialplans/resources/switch/conf/dialplan/041_call_acl.xml /var/www/fusionpbx/app/dialplans/resources/switch/conf/dialplan
(optional)
# chown -R www-data. /var/www/fusionpbx
FusionPBX Menu -> Advanced -> Upgrade -> Schema + App Defaults + Menu Defaults + Permission Defaults
Note, by default in Dialplan call_acl by default is disabled. Done this is mainly cause you don't want to enable it on all domains. So, enable it per domain.
For cons - it's really heavy under high load and with big number of rules, cause heavily using regular expressions which are not super fast.
No comments:
Post a Comment