I am using the VOIP Extension connected to FreePBX (Asterisk), and have popups enabled for incoming and outgoing calls. I would like the ability to not show the popups for internal extensions, which in my case are always 3 digits. There doesn't seem to be any way to accomplish this currently, although I suppose it could be done using some custom code.
VOIP Extension: Filter call popups to ignore internal extensions
Collapse
X
-
There is no option available. You can try to add a list of ignored numbers to "List of ignored numbers" field in the Asterisk configuration under EspoCRM Administration. -
Thanks for the reply. I realize there is currently no option available, which is why I posted under Feature Requests. The list of ignored numbers field doesn't really work, since per the description it ignores any numbers starting with the entered values. It would be much more flexible if that field supported regex or wildcards.Comment
-
In case anyone else is interested, I made a simple customization to the VoipEvent module to support using regular expressions in the Ignored Number list. The new code checks if the entry is a valid regular expression (according to PCRE syntax), and if so evaluates it as such, otherwise it reverts to the default logic.
The regular expression that I'm using to ignore 3-digit internal extensions is: #\A\d{3}\z#
I'd love to see this added as a built-in feature, as it add much more flexibility. Alternately, is there a way I can make this customization such that I won't have to manually re-apply every time there's an update to the VOIP integration package?
Code:public function isIgnoredNumber($data) { .... $ignoredNumber = trim($ignoredNumber); /*** BEGIN REGEX CUSTOMIZATION ***/ if (preg_match($ignoredNumber, null) !== false) { if (preg_match($ignoredNumber, $phoneNumber) == 1) { return true; } else { continue; } } /*** END REGEX CUSTOMIZATION ***/ ..... } return false; }
Last edited by moderator; 05-09-2019, 02:11 PM.Comment
-
Comment
Comment