Announcement

Collapse
No announcement yet.

VOIP Extension: Filter call popups to ignore internal extensions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • VOIP Extension: Filter call popups to ignore internal extensions

    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.

  • #2
    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.
    Job Offers and Requests

    Comment


    • #3
      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


      • #4
        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;
            }
        While working on this, I discovered a bug in the Asterisk v13 integration. The Newchannel processing logic does not properly handle outgoing calls. It seems this is correctly implemented in the Asterisk v11 module, so I've switched to using that for the time being.
        Last edited by moderator; 05-09-2019, 02:11 PM.

        Comment


        • #5
          Thanks for your code. We will test it and might add to the extension.
          Job Offers and Requests

          Comment


          • #6
            hello i want to show eum field in call popup

            Comment

            Working...
            X