eSMDR documentation

DBF output through ODBC

Configure eSMDR to write call records to Visual FoxPro DBF files.

ODBC output is usually straightforward: current database systems are well documented, and their ODBC connectors are bundled with the product or available from the vendor. DBF files require a little more work. This example writes to a calls.dbf file used by a popular telephone accounting application.

Install the DBF driver

Install the Microsoft Visual FoxPro ODBC driver (VFPODBC.msi). Microsoft has progressively retired support for the format, so verify any copy obtained from an archive:

MD5: 4fbb57a7efabde9925af86a239e5c93c

The driver installs on both 32-bit and 64-bit Windows.

Create the system DSN

  1. Open ODBC Data Source Administrator. On 64-bit Windows, run %windir%\sysWOW64\odbcad32.exe.
  2. Open the System DSN tab and select Add.
  3. Select Microsoft Visual FoxPro Driver.
  4. Set Path to the directory containing calls.dbf.
  5. Open Options and clear Null and Fetch data in background.

Configure eSMDR

Add the following section to esmdr.ini:

[ODBC3]
enabled=1
dsn="wintariff"
table="calls"
fields="Date, co, extension, account, number, transfer, iduration, itime, ringbefore, callerid, callmode"
values="{^%Y.%M.%D}, '%C', '%E', '%c', IIF(%i=0,'%n','incoming <D>'+'%t'), IIF('%c'='TR','*',''), %d, %h*3600+%m*60+%s, %r, IIF(%i<>0,'%n',''), '%c'"

Restart the eSMDR service after changing the configuration.

Choosing an integration method

TCPOUT is the simplest way to connect eSMDR to another application because eSMDR emulates a PBX and the receiving application stores the data using its standard module. Testing found errors in some such modules, however. Direct ODBC output provides better reliability and performance when you can work with the application’s data structure.