CTI Client SQL functions (ActiveX)

SQL

Contents  Back  Next

Use of SQL functions

In telephony applications it is offen necessary to access a database, in order, for example, to display further information beyond a telephone number: address, notes, etc. The CTI server already uses database connections in order to identify caller numbers and save call data records. You may use a third database connection to perform your own queries. First configure the data source on the CTI server. This can be set on the “Database interface” page of the server control panel.

 

clip0065

It is then recommended to test the commands SQLLogin, SQLBegin, SQLNext and SQLEnd using the CTI Browser.

 

Prefix

The SQL functions start with the prefix "SQL".

 

Retrieve addresses from the master database

The database for caller number identification can also be used in reverse to get a number from a name.

 

SQLGetDbBook

Retrieves particular records or a complete address list from the master database.

 

Queries with additional database connections

Use the following commands for your own database queries.

 

SQLBegin

Start a database query.

SQLEnd

End a query.

SQLLogin

Log client on to database.

SQLNext

Continue a query.

 

Steps in an example session

1.Log on to database with SQLLogin("Password");
2.OnSQLLogin returns True: logon succeeded
3.Request 50 records using SQLBegin("SELECT * FROM Members",50); Function returns Query ID of 1.
4.Data records arrive in event OnSQLData an.
5.A further 30 records are requested for query number 1: SQLNext(1,30);
6.Data records arrive in event OnSQLData.
7.End query number 1 using SQLEnd(1);
8.Event OnSQLEnd confirms the end of the query.

 

See also

ActiveX overview

 


Send feedback to TAPIMaster®

© 2020 Tino Kasubke. All rights reserved.