System information

16. Relational Database Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Installing and Configuring PostgreSQL and MySQL 342
Installing PostgreSQL for CentOS 342
Installing PostgreSQL for Ubuntu 342
Installing MySQL for CentOS 343
Installing MySQL for Ubuntu 343
Configuring PostgreSQL 343
Configuring MySQL 345
Installing and Configuring ODBC 346
Configuring ODBC for PostgreSQL 347
Configuring ODBC for MySQL 349
Configuring ODBC for Microsoft SQL 350
Validating the ODBC Connector 351
Configuring res_odbc to Allow Asterisk to Connect Through ODBC 352
Managing Databases 353
Troubleshooting Database Issues 353
A Gentle Introduction to func_odbc 354
Getting Funky with func_odbc: Hot-Desking 354
Using Realtime 368
Static Realtime 368
Dynamic Realtime 371
Storing Call Detail Records (CDRs) 375
ODBC Voicemail 378
Creating the Large Object Type for PostgreSQL 379
ODBC Voicemail Storage Table Layout 381
Configuring voicemail.conf for ODBC Storage 382
Testing ODBC Voicemail 383
Conclusion 387
17.
Interactive Voice Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
What Is IVR? 389
Components of an IVR 390
IVR Design Considerations 392
Do 392
Don’t 392
Asterisk Modules for Building IVRs 392
CURL 392
func_odbc 392
AGI 393
AMI 393
A Simple IVR Using CURL 393
Installing the cURL Module 393
The Dialplan 394
xii | Table of Contents