Call Us Today! 877.742.2583

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


The FreeSWITCH core provides the API for modules to make connections to databases.

 Click here to expand Table of Contents


Data Source Names. Database connections are defined with DSN in XML configuration parameters like "core-db-dsn" and "odbc-dsn".


The generic DSN format is <type>://<connection string>


FreeSWITCH currently supports the following DSN types:



DSN for SQLite

Note the 3rd / (slash) in the second example to indicate a local absolute path.


DSN for PostgreSQL

Upon the addition of multiple core database options (PostgreSQL, ODBC, SQLite), the format for the DSN changed so that FreeSWITCH knows which database type to use.

The following DSN (data source name) formats are valid for ODBC databases:

DSN with username and password

DSN for ODBC including password


DSN with username

Note the colon at the end.

DSN for ODBC with username only

DSN only

Note the two colons at the end.

DSN for ODBC without username


DSN-less connections are also possible. Such connections don't require configuration in odbc.ini.

Essentially the syntax is the same options you would have in odbc.ini name-value pairs, separated by ; (semicolon)

MyODBC example (OPTION=67108864 enables batched statements):

<param name="core-db-dsn" value="odbc://DRIVER=mysql;SERVER=a.b.c.d;UID=username;PWD=secretpassword;DATABASE=freeswitch;OPTION=67108864">

See Also