Wrong CallerID number to name conversion

  1. 11 years ago

    I have FOP2 2.26 installed, and I have entered some data in the phonebook. Fop2 correctly shows (in the notification box that pops up when my phone rings) names for external callers when number is matched in the phonebook, but when an extension (number 34) calls me, the phonebook matches the number (34) to the last two digits of a phone book contact that has a number that ends in 34 (05164455334), and shows me the external contact name, which is clearly wrong.

    I think that the number matching should be done using at least 5 or 6 numbers, so that estension numbers do not match phonebook records that end in the same 2 numbers as the extension.

    Ideally the minimum lenght of a number to be matched should be configurable, with a sane default of 5 or 6 numbers.

  2. admin

    1 Jul 2013 Administrator

    What fop2 version are you using?

  3. 2.26, the latest non-beta.

  4. admin

    1 Jul 2013 Administrator

    You will have to modify the file /var/www/html/fop2/checkdir.php, look for an if block after a mysql query:

    if($res) {
        if($db->num_rows()>0) {
            $row = $db->fetch_assoc();
            ...
            ...
        }    
    }

    Add another if block before to exclude short clids, something like:

    if($largo<5) {
        if($res) { 
            if($db->num_rows()>0) {
                $row = $db->fetch_assoc();
                ...
                ...
            }
        }
    }
  5. Thanks, I will modify the code.

    I suggest that you include this fix in the next version.

or Sign Up to reply!