<!-- Or, if you have PGSQL support, you can use that -->
<!--<param name="odbc-dsn" value="pgsql://hostaddr=127.0.0.1 dbname=freeswitch user=freeswitch password='' options='-c client_min_messages=NOTICE' application_name='freeswitch'" />-->
+ <!-- By default each profile will give the database 1000 ms to spin-up on load -->
+ <!--<param name="db-spin-up-wait-ms" value="1000" />-->
+
<!--Uncomment to set all inbound calls to no media mode-->
<!--<param name="inbound-bypass-media" value="true"/>-->
profile->tls_version |= SOFIA_TLS_VERSION_TLSv1_2;
profile->tls_version |= SOFIA_TLS_VERSION_TLSv1_3;
profile->tls_timeout = 300;
+ profile->db_spin_up_wait_ms = 1000;
profile->mflags = MFLAG_REFER | MFLAG_REGISTER;
profile->server_rport_level = 1;
profile->client_rport_level = 1;
}
} else if (!strcasecmp(var, "odbc-dsn") && !zstr(val)) {
profile->odbc_dsn = switch_core_strdup(profile->pool, val);
+ } else if (!strcasecmp(var, "db-spin-up-wait-ms") && !zstr(val)) {
+ profile->db_spin_up_wait_ms = atoi(val);
} else if (!strcasecmp(var, "db-pre-trans-execute") && !zstr(val)) {
profile->pre_trans_execute = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "db-post-trans-execute") && !zstr(val)) {
launch_sofia_profile_thread(profile);
if (profile->odbc_dsn) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Connecting ODBC Profile %s [%s]\n", profile->name, url);
- switch_yield(1000000);
+ switch_yield(profile->db_spin_up_wait_ms * 1000);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Started Profile %s [%s]\n", profile->name, url);
}