CallerHub
EN
Download

Caller name from SQL Server, Oracle, MySQL or PostgreSQL

CRM and ERP systems store customers in a database. For the phone system to show a name from it, you need a query that returns the name for a phone number, and a way for the phone system to trigger this query for every call.

What to prepare in the database

  • A dedicated read-only user: read rights only on the tables or a view the query reads from. Do not use an administrative account such as sa or SYSTEM: a dedicated account limits the rights, and an account lockout does not hit database administration.
  • The right tables: many CRM and ERP systems keep phone numbers in a separate communication table (one row per phone, fax or e-mail), linked to the tables for companies and persons. Deleted or inactive records should be left out.
  • Different notations: the database contains “089 / 999 98-042”, the phone system reports “+498999998042”. A simple comparison finds nothing; the numbers must be normalised before comparing.
  • Network: the querying computer reaches the database on its port, e.g. 1433 (SQL Server), 1521 (Oracle), 3306 (MySQL/MariaDB) or 5432 (PostgreSQL).

With CallerHub: data source, query, done

  1. Under Data sources, choose Add data source and the type: Microsoft SQL Server, Oracle or an ODBC database (MySQL/MariaDB, PostgreSQL and others).
  2. Enter the connection and Test connection. SQL Server with SQL or Windows authentication, named instances with \; for Oracle the driver is included and no Oracle client is needed; for ODBC, choose the installed 64-bit driver.
  3. Choose the query for the phone number list: a template for your CRM or ERP, or the SQL assistant.
  4. Test query … with a known number, then Save and apply.
Setup
Setup, step 4: data source – where the names come from.

The query

-- The column names nummer, anzeigename, rang, land and id are fixed
-- (number, display name, rank, country, id).
SELECT c.phone AS nummer, c.company + ' - ' + c.name AS anzeigename,
       0 AS rang, c.country AS land, c.id AS id
FROM dbo.contacts c WHERE c.phone IS NOT NULL

The number may be stored in any notation; CallerHub removes spaces, hyphens, slashes, brackets and “(0)” and adds the country code from the column land or the configured code. With duplicate numbers, the lower rang wins, for example the company (0) before the contact person (1).

The SQL assistant

It reads the database catalogue, read-only, and suggests tables with columns for phone number and name, with the number of entries. It recognises communication tables and joins them to the tables of companies and persons, excludes deleted or inactive records if a suitable column exists, and shows a preview. After you accept, it shows a script for a read-only user that may read only the selected tables – for SQL Server, Oracle, MySQL/MariaDB and PostgreSQL. You hand the script to your database administrator.

List in memory or query per call

  • Phone number list (recommended): CallerHub loads all numbers at start-up and at the set interval (1 to 1440 minutes) into memory and answers every call from there. If the database is slow or unreachable, the most recently loaded list stays in use and the response is not delayed.
  • Direct query: CallerHub queries the database for every call. It translates placeholders such as :num_e164 or :num_national for each database; results are cached.

The names reach every connected phone system: STARFACE, 3CX, Asterisk/FreePBX, desk phones through the LDAP phone book.

Frequently asked questions

Does CallerHub need write access to the database?

No. CallerHub only reads and does not create a database of its own. That is why the SQL assistant suggests a read-only user that may read only the selected tables.

Which databases are supported?

Microsoft SQL Server and Oracle directly, MySQL/MariaDB and PostgreSQL via ODBC, and other ODBC databases such as Firebird, SAP SQL Anywhere or SAP HANA, optionally with a custom connection string.

I do not know the tables of my CRM. How do I find the query?

For common CRM and ERP systems, “Template” inserts a ready-made query. Otherwise the SQL assistant looks for suitable tables and builds the query; the help describes the way for Oracle and SQL Server step by step.

Can I combine several databases?

Yes, with the full edition up to ten data sources. They are queried in the order shown; the first one with a match provides the name. If one fails, the others keep answering.

Try it

Test it with your own data.

Try the full edition for 30 days: choose “Request trial …” in CallerHub and the trial key arrives by e-mail. The setup wizard guides you through data source, phone system and test lookup. After that, CallerHub continues as the free basic edition without losing settings or data.