Basic documentation about using ODBC with freeswitch
Freeswitch supports ODBC, enabling various aspects of a system configuration and state to be stored within a database. SIP registrations, call/channel state, voicemail messages and voicemail preferences may be stored in the database. Additionally, mod_limit configuration, mod_nibblebill and call detail record information may be stored in a database using ODBC.
For more information see using ODBC in the core
Remember that you have to add/uncomment the following in spidermonkey.conf.xml file, inside conf/autoload_configs of your installaton directory
Compilation help: Mod_spidermonkey_odbc