<!--<param name="rtp-end-port" value="32768"/>-->
<param name="rtp-enable-zrtp" value="true"/>
<!-- <param name="core-db-dsn" value="dsn:username:password" /> -->
+ <!-- Allow to specify the sqlite db at a different location (In this example, move it to ramdrive for better performance on most linux distro (note, you loose the data if you reboot)) -->
+ <!-- <param name="core-db-name" value="/dev/shm/core.db" /> -->
<!-- The system will create all the db schemas automatically, set this to false to avoid this behaviour-->
<!--<param name="auto-create-schemas" value="true"/>-->
<!-- <param name="core-dbtype" value="MSSQL"/> -->
char *odbc_dsn;
char *odbc_user;
char *odbc_pass;
+ char *dbname;
uint32_t debug_level;
uint32_t runlevel;
uint32_t tipping_point;
runtime.default_dtmf_duration = SWITCH_DEFAULT_DTMF_DURATION;
runtime.min_dtmf_duration = SWITCH_MIN_DTMF_DURATION;
runtime.odbc_dbtype = DBTYPE_DEFAULT;
+ runtime.dbname = NULL;
/* INIT APR and Create the pool context */
if (apr_initialize() != SWITCH_STATUS_SUCCESS) {
switch_rtp_set_start_port((switch_port_t) atoi(val));
} else if (!strcasecmp(var, "rtp-end-port") && !zstr(val)) {
switch_rtp_set_end_port((switch_port_t) atoi(val));
+ } else if (!strcasecmp(var, "core-db-name") && !zstr(val)) {
+ runtime.dbname = switch_core_strdup(runtime.memory_pool, val);
} else if (!strcasecmp(var, "core-db-dsn") && !zstr(val)) {
if (switch_odbc_available()) {
runtime.odbc_dsn = switch_core_strdup(runtime.memory_pool, val);
r = _switch_cache_db_get_db_handle(dbh, SCDB_TYPE_ODBC, &options, file, func, line);
} else {
- options.core_db_options.db_path = SWITCH_CORE_DB;
+ if (runtime.dbname) {
+ options.core_db_options.db_path = runtime.dbname;
+ } else {
+ options.core_db_options.db_path = SWITCH_CORE_DB;
+ }
r = _switch_cache_db_get_db_handle(dbh, SCDB_TYPE_CORE_DB, &options, file, func, line);
}