Cidlookup from postgresql

Status
Not open for further replies.

goose2600

Member
Dec 18, 2018
51
1
8
Hi, looks like mod_cidlookup does not search in the fusionpbx contacts database, while searching in external source (like CNAM) works.

Here is the cidlookup.conf.xml:
Code:
    <!-- comment out sql to not setup a database (directory) lookup -->
    <param name="sql" value="
SELECT trim(v_contacts.contact_name_given || ' ' || v_contacts.contact_name_family || ' (' || v_contacts.contact_organization || ')') AS name, v_contact_phones.phone_number AS number
FROM v_contacts, v_contact_phones
WHERE v_contact_phones.contact_uuid = v_contacts.contact_uuid AND (v_contact_phones.phone_number = '${caller_id_number}' OR v_contact_phones.phone_number = '1${caller_id_number}')
LIMIT 1
      "/>


If I try to make a select from the command line, inserting a phone number (i.e. 0123456789) instead of variable, it works:
Code:
SELECT trim(v_contacts.contact_name_given || ' ' || v_contacts.contact_name_family || ' (' || v_contacts.contact_organization || ')') AS name, v_contact_phones.phone_number AS number
FROM v_contacts, v_contact_phones
WHERE v_contact_phones.contact_uuid = v_contacts.contact_uuid AND (v_contact_phones.phone_number = '0123456789' OR v_contact_phones.phone_number = '0123456789')
LIMIT 1;


Can someone help me?
Thanks!
 

Andrew Byrd

Member
Feb 16, 2018
309
10
18
53
Same issue . . . please let me know if anyone finds a fix. I thought the purpose of the CID lookup module was to check contacts in Fusion first.
 
Status
Not open for further replies.