Skip to content

Integrate Cloud Voice with Microsoft SQL

Link Cloud Voice to a Microsoft SQL database and your PBX (Private Branch Exchange, the phone system) checks every inbound (incoming) call against that database. When the caller’s number matches a stored record, the matching contact name is shown with the call, so staff can see who is calling before they answer.

ItemRequirement
Cloud VoicePlan: Enterprise Plan (EP) or Ultimate Plan (UP)
Firmware: Version 84.16.0.70 or later
Microsoft SQLNone. Any version of Microsoft SQL Server can be integrated with Cloud Voice.

Step 1. Turn on the Microsoft SQL integration

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

    1. Sign in to the PBX web portal and go to Contacts > Company Contacts.

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

      Synchronize Contacts control on the Company Contacts page

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

    Microsoft SQL integration panel with the server and credential fields

    SettingDescription
    Server AddressPoint Cloud Voice at your Microsoft 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 the server uses a different port, append it after a colon, for example 112.48.21.123:20001.
    Database NameThe name of the database to query.
    Timeout(s)How long, in seconds, to wait when connecting to the server before the attempt times out.
    UserThe account name used to sign in to the database.
    PasswordThe password for that account.
    Auto-match Contact FilterA SELECT statement that tells Cloud Voice how to look up a caller’s number, written as select ${MAP} from {schema_name}.{table_name} where {condition_to_filter_number}. See the breakdown below.

Take this statement as a model:

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

Each part does the following:

  • select ${MAP}, names the database column whose value you want shown as the caller ID name. At runtime, ${MAP} is substituted with the PBX field or fields (First Name, Last Name, or both) that you enable in the Map section during Step 2.
  • from testpbx.contacts, the table to read from. Always give it as a two-part name in the form {schema_name}.{table_name}.
  • where businumber like CONCAT('%', ${NUMBER}, '%'), returns the rows where the businumber column contains the caller’s number (${NUMBER}) anywhere within it.

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 display the caller’s name.

    Cloud Voice, Map section pairing PBX contact fields with Microsoft SQL columns

    1. For Contacts ID, First Name, and Business Number, enter the matching column name from your Microsoft SQL contacts table. Once saved, an inbound call that matches a record shows the contact’s first name.

    2. Optional: to show the last name as well, select the Last Name checkbox and enter its corresponding Microsoft SQL column.

  3. To pull Microsoft SQL contacts into the PBX, enable and map the additional fields you want to sync.

    Field mapping used when syncing Microsoft SQL contacts into the PBX

  4. Click Save.

  • Cloud Voice is connected to your Microsoft SQL server.

    Connection status confirming a successful link to the Microsoft SQL server

  • When an inbound call matches a record in your database, the caller’s name is displayed.

To let extension users call your Microsoft SQL contacts directly from the Cloud Voice App, set up contact synchronization from the Microsoft SQL server. For details, see Set up Contact Synchronization from Microsoft SQL.