Incoming call notification CallerID issues

Hello. I'm running FOP2 2.20 licensed on a customer of mine and they're having an issue with the incoming calls notification feature.

Their extensions are in the 3100-3199 range. For instance, when extension 3123 calls 3100 (receptionist), the incoming call popup reports a call from 99173123. We tried to manually add 3123 to Visual Phonebook, but the CallerID keeps on getting matched against 99173123 instead of 3123.

Is there a way to first attempt to match against the whole CallerID and if that fails match against a number ending on the CallerID?

Comments

  • Hi,

    The problem is fixed on fop 2.21. You can patch your current checkdir.php and replace this line:
    $res = $db->consulta("SELECT concat(firstname,' ',lastname) as name,company,picture FROM visual_phonebook WHERE phone1 LIKE '%%%s'OR phone2 LIKE '%%%s' LIMIT 1",$clid_significant,$clid_significant);
    
    with:
    $res = $db->consulta("SELECT concat(firstname,' ',lastname) AS name,company,picture FROM visual_phonebook WHERE phone1 LIKE '%%%s'OR phone2 LIKE '%%%s' ORDER BY LENGTH(CONCAT(phone1,phone2)) LIMIT 1",$clid_significant,$clid_significant);
    
Sign In or Register to comment.