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:
If I try to make a select from the command line, inserting a phone number (i.e. 0123456789) instead of variable, it works:
Can someone help me?
Thanks!
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!