Call Us Today! 877.742.2583




Page tree
Skip to end of metadata
Go to start of metadata

About

Postgres native support was added in FreeSWITCH 1.2.5.

 Click here to expand Table of Contents

Dependencies

libpq and the associated dev packages are required

CentOS

Debian

Configure

If you have installed a later version of PostgreSQL from a source other then your distro's repositories, and its installed to a non-standard location such as /usr/pgsql-9.5 you will need to adjust your PATH and/or PKG_CONFIG_PATH environment variables to properly locate either pg_config or libpq.pc

Adjust your PKG_CONFIG_PATH and PATH as required for your platform.

conf/autoload_configs/switch.conf.xml

host vs hostaddr

'hostaddr' ONLY takes a numeric ip address and will not resolve a hostname. Use 'host' for a DNS hostname. If you specify both 'host' and 'hostaddr' settings, 'hostaddr' takes precedence.

PostgreSQL

For PostgreSQL, FS strips the 'pgsql://' from the DSN and passes the remainder of the string directly to libpq's PQconnectdb() for connection to the database. See the libpq docs for further information on creating a proper connections string.

 

Database Tables

Once you have PostgreSQL configured in the core, you can connect to the database and ensure you have tables, like the following.

PostgreSQL tables