Fix the PostgreSQL query in cidlookup.conf.xml.
This commit is contained in:
parent
728e33bd68
commit
86b0e88d16
|
|
@ -1,15 +1,11 @@
|
||||||
<configuration name="cidlookup.conf" description="cidlookup Configuration">
|
<configuration name="cidlookup.conf" description="cidlookup Configuration">
|
||||||
<settings>
|
<settings>
|
||||||
<!-- comment out url to not setup a url based lookup -->
|
<!-- comment out url to not setup a url based lookup -->
|
||||||
<param name="url" value="http://query.voipcnam.com/query.php?api_key=MYAPIKEY&number=${caller_id_number}"/>
|
<!--<param name="url" value="http://query.voipcnam.com/query.php?api_key=MYAPIKEY&number=${caller_id_number}"/>-->
|
||||||
|
|
||||||
<!-- comment out url to not setup a url based lookup -->
|
|
||||||
<!-- contact support@to-call.me for more details -->
|
|
||||||
<!-- <param name="url" value="http://cnam.to-call.me/lookup/${caller_id_number}?api_key=MYAPIKEY"/> -->
|
|
||||||
|
|
||||||
<!-- comment out whitepages-apikey to not use whitepages.com, you must
|
<!-- comment out whitepages-apikey to not use whitepages.com, you must
|
||||||
get an API key from http://developer.whitepages.com/ -->
|
get an API key from http://developer.whitepages.com/ -->
|
||||||
<!--<param name="whitepages-apikey" value="MYAPIKEY"/>-->
|
<param name="whitepages-apikey" value="MYAPIKEY"/>-->
|
||||||
|
|
||||||
<!-- set to false to not cache (in memcache) results from the url query -->
|
<!-- set to false to not cache (in memcache) results from the url query -->
|
||||||
<param name="cache" value="true"/>
|
<param name="cache" value="true"/>
|
||||||
|
|
@ -21,11 +17,12 @@
|
||||||
|
|
||||||
<!-- comment out sql to not setup a database (directory) lookup -->
|
<!-- comment out sql to not setup a database (directory) lookup -->
|
||||||
<param name="sql" value="
|
<param name="sql" value="
|
||||||
SELECT v_contacts.contact_name_given || ' ' || v_contacts.contact_name_family ||' ('||v_contact_phones.phone_type||')' AS name, v_contact_phones.phone_number AS number
|
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
|
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}'
|
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
|
LIMIT 1
|
||||||
"/>
|
"/>
|
||||||
|
|
||||||
<!-- comment out citystate-sql to not setup a database (city/state)
|
<!-- comment out citystate-sql to not setup a database (city/state)
|
||||||
lookup -->
|
lookup -->
|
||||||
<!--
|
<!--
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue