Difference between revisions of "Mod cidlookup"
From FusionPBX
(Created page with "==Overview== The scope of this is to allow the use of FusionPBX's Contacts module to populate phones with Caller ID Name. This is aimed towards a linux user. ==Preface== There's...") |
(→unixODBC) |
||
Line 17: | Line 17: | ||
For Ubuntu | For Ubuntu | ||
− | apt-get install | + | apt-get install unixodbc |
− | + | apt-get install unixodbc-dev | |
==cidlookup.conf.xml== | ==cidlookup.conf.xml== |
Revision as of 07:09, 29 October 2011
Overview
The scope of this is to allow the use of FusionPBX's Contacts module to populate phones with Caller ID Name. This is aimed towards a linux user.
Preface
There's one major drawback of using this - you cannot assign multiple people the same number as it will only return the first result.
Requirements
unixODBC mod_cidlookup at least mod_cidlookup installed with unixodbc support.
unixODBC
For CentOS:
yum install unixodbc unixodbc-dev cd /usr/src/freeswitch ./configure && make mod_cidlookup-install
For Ubuntu
apt-get install unixodbc apt-get install unixodbc-dev
cidlookup.conf.xml
PostgreSQL:
SELECT v_contacts.n_given || ' ' || v_contacts.n_family AS name, v_contacts_tel.tel_number AS number FROM v_contacts, v_contacts_tel WHERE v_contacts_tel.contact_id = v_contacts.contact_id AND v_contacts_tel.tel_number = '${caller_id_number}'
MySQL:
SELECT CONCAT(v_contacts.n_given, ' ', v_contacts.n_family) AS name, v_contacts_tel.tel_number AS number FROM v_contacts, v_contacts_tel WHERE v_contacts_tel.contact_id = v_contacts.contact_id AND v_contacts_tel.tel_number = '${caller_id_number}'