Skip to content

Integrate Cloud Voice with Microsoft SQL

Linking Cloud Voice to a Microsoft SQL database lets the system look up incoming callers in your own contact records. When a number on an inbound call matches a row in the database, Cloud Voice shows the caller’s name instead of a bare number. This page walks you through connecting the database, defining the lookup query, and mapping the fields used for caller display.

ItemRequirement
Cloud VoiceEnterprise Plan (EP) or Ultimate Plan (UP), running firmware 84.16.0.70 or later.
Microsoft SQLAny version of Microsoft SQL Server works. There are no version restrictions.

Step 1. Turn on the Microsoft SQL integration

Section titled “Step 1. Turn on the Microsoft SQL integration”
  1. Open the integration settings.

    1. Sign in to the Cloud Voice management portal and go to Contacts > Company Contacts.

    2. Click Synchronize Contacts at the top of the page.

      Company Contacts page with the option to synchronize contacts from a third-party source

  2. Switch on Enable Microsoft SQL Integration and fill in the connection details described below.

    Microsoft SQL integration settings with connection fields and the auto-match filter

    FieldWhat to enter
    Server AddressThe address of your SQL server. If the server listens on the default port 1433, enter only its IP address or domain name (for example, 112.48.21.123). If it listens on a different port, append the port (for example, 112.48.21.123:20001).
    Database NameThe name of the database to query.
    Timeout(s)How long, in seconds, Cloud Voice waits when connecting to the server before giving up.
    UserThe account name used to connect to the database.
    PasswordThe password for that account.
    Auto-match Contact FilterA SELECT statement that tells Cloud Voice how to find a caller in your data (see below).

The Auto-match Contact Filter is a SELECT statement in the form:

select ${MAP} from {schema_name}.{table_name} where {condition_to_filter_number}

For example:

select ${MAP} from testpbx.contacts where businumber like CONCAT('%', ${NUMBER}, '%')

Each part does the following:

  • select ${MAP}, the column whose value becomes the caller ID name. At runtime, ${MAP} is replaced by the field or fields (First Name, Last Name, or both) you turn on in the Map section.
  • from testpbx.contacts, the source table, written as a two-part name ({schema_name}.{table_name}).
  • where businumber like CONCAT('%', ${NUMBER}, '%'), the match condition. Here it returns any row whose businumber value contains the incoming number (${NUMBER}) anywhere in the string.

Step 2. Map fields between Cloud Voice and Microsoft SQL

Section titled “Step 2. Map fields between Cloud Voice and Microsoft SQL”
  1. Scroll down to the Map section.

  2. Map the fields needed to show the caller’s name.

    Cloud Voice, field mapping between Cloud Voice contact fields and Microsoft SQL columns

    1. For Contacts ID, First Name, and Business Number, enter the matching column name from your Microsoft SQL contacts table.

      Once a call matches a contact, the contact’s first name is shown.

    2. Optional: To display the last name too, select the Last Name checkbox and enter its corresponding Microsoft SQL column name.

  3. To also copy Microsoft SQL contacts into Cloud Voice, enable the fields you want to synchronize and map each one to a column.

    Additional field mappings used when synchronizing Microsoft SQL contacts into Cloud Voice

  4. Click Save.

  • Cloud Voice connects to your Microsoft SQL server.

    Confirmation that the Microsoft SQL connection succeeded

  • When an inbound call matches a record in the database, the caller’s name appears on the call.

To let extension users place calls to your Microsoft SQL contacts directly from the Cloud Voice App, set up contact synchronization from the SQL server. See Set up Contact Synchronization from Microsoft SQL.