mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 12:40:17 +00:00
Merge branch 'master' of git.freeswitch.org:freeswitch
This commit is contained in:
commit
5c5d260bc7
16
bootstrap.sh
16
bootstrap.sh
@ -22,7 +22,7 @@ ac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[
|
||||
if test -z "$ac_version"; then
|
||||
echo "bootstrap: autoconf not found."
|
||||
echo " You need autoconf version 2.59 or newer installed"
|
||||
echo " to build FreeSWITCH from SVN."
|
||||
echo " to build FreeSWITCH from source."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -37,7 +37,7 @@ IFS=.; set $ac_version; IFS=' '
|
||||
if test "$1" = "2" -a "$2" -lt "59" || test "$1" -lt "2"; then
|
||||
echo "bootstrap: autoconf version $ac_version found."
|
||||
echo " You need autoconf version 2.59 or newer installed"
|
||||
echo " to build FreeSWITCH from SVN."
|
||||
echo " to build FreeSWITCH from source."
|
||||
exit 1
|
||||
else
|
||||
echo "bootstrap: autoconf version $ac_version (ok)"
|
||||
@ -50,7 +50,7 @@ am_version=`${AUTOMAKE:-automake} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[
|
||||
if test -z "$am_version"; then
|
||||
echo "bootstrap: automake not found."
|
||||
echo " You need automake version 1.7 or newer installed"
|
||||
echo " to build FreeSWITCH from SVN."
|
||||
echo " to build FreeSWITCH from source."
|
||||
exit 1
|
||||
fi
|
||||
IFS=_; set $am_version; IFS=' '
|
||||
@ -59,7 +59,7 @@ IFS=.; set $am_version; IFS=' '
|
||||
if test "$1" = "1" -a "$2" -lt "7"; then
|
||||
echo "bootstrap: automake version $am_version found."
|
||||
echo " You need automake version 1.7 or newer installed"
|
||||
echo " to build FreeSWITCH from SVN."
|
||||
echo " to build FreeSWITCH from source."
|
||||
exit 1
|
||||
else
|
||||
echo "bootstrap: automake version $am_version (ok)"
|
||||
@ -71,7 +71,7 @@ acl_version=`${ACLOCAL:-aclocal} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a
|
||||
if test -z "$acl_version"; then
|
||||
echo "bootstrap: aclocal not found."
|
||||
echo " You need aclocal version 1.7 or newer installed"
|
||||
echo " to build FreeSWITCH from SVN."
|
||||
echo " to build FreeSWITCH from source."
|
||||
exit 1
|
||||
fi
|
||||
IFS=_; set $acl_version; IFS=' '
|
||||
@ -80,7 +80,7 @@ IFS=.; set $acl_version; IFS=' '
|
||||
if test "$1" = "1" -a "$2" -lt "7"; then
|
||||
echo "bootstrap: aclocal version $acl_version found."
|
||||
echo " You need aclocal version 1.7 or newer installed"
|
||||
echo " to build FreeSWITCH from SVN."
|
||||
echo " to build FreeSWITCH from source."
|
||||
exit 1
|
||||
else
|
||||
echo "bootstrap: aclocal version $acl_version (ok)"
|
||||
@ -96,7 +96,7 @@ libtool=${LIBTOOL:-`${LIBDIR}/apr/build/PrintPath glibtool libtool libtool22 lib
|
||||
lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
|
||||
if test -z "$lt_pversion"; then
|
||||
echo "bootstrap: libtool not found."
|
||||
echo " You need libtool version 1.5.14 or newer to build FreeSWITCH from SVN."
|
||||
echo " You need libtool version 1.5.14 or newer to build FreeSWITCH from source."
|
||||
exit 1
|
||||
fi
|
||||
lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
|
||||
@ -121,7 +121,7 @@ if test $lt_status = "good"; then
|
||||
echo "bootstrap: libtool version $lt_pversion (ok)"
|
||||
else
|
||||
echo "bootstrap: libtool version $lt_pversion found."
|
||||
echo " You need libtool version 1.5.14 or newer to build FreeSWITCH from SVN."
|
||||
echo " You need libtool version 1.5.14 or newer to build FreeSWITCH from source."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -209,8 +209,8 @@
|
||||
<param name="force-register-db-domain" value="$${domain}"/>
|
||||
|
||||
<!-- enable rtcp on every channel also can be done per leg basis with rtcp_audio_interval_msec variable set to passthru to pass it across a call-->
|
||||
<!--<param name="rtcp-audio-interval-msec" value="10000"/>-->
|
||||
<!--<param name="rtcp-video-interval-msec" value="10000"/>-->
|
||||
<!--<param name="rtcp-audio-interval-msec" value="5000"/>-->
|
||||
<!--<param name="rtcp-video-interval-msec" value="5000"/>-->
|
||||
|
||||
<!--force suscription expires to a lower value than requested-->
|
||||
<!--<param name="force-subscription-expires" value="60"/>-->
|
||||
|
@ -2050,6 +2050,10 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_command(ftdm_channel_t *ftdmchan, ftdm_co
|
||||
|
||||
case FTDM_COMMAND_SET_RX_GAIN:
|
||||
{
|
||||
if (!FTDM_IS_VOICE_CHANNEL(ftdmchan)) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Cannot set rx gain in non-voice channel of type: %s\n", ftdm_chan_type2str(ftdmchan->type));
|
||||
GOTO_STATUS(done, FTDM_FAIL);
|
||||
}
|
||||
ftdmchan->rxgain = FTDM_COMMAND_OBJ_FLOAT;
|
||||
reset_gain_table(ftdmchan->rxgain_table, ftdmchan->rxgain, ftdmchan->native_codec);
|
||||
if (ftdmchan->rxgain == 0.0) {
|
||||
@ -2068,6 +2072,10 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_command(ftdm_channel_t *ftdmchan, ftdm_co
|
||||
break;
|
||||
case FTDM_COMMAND_SET_TX_GAIN:
|
||||
{
|
||||
if (!FTDM_IS_VOICE_CHANNEL(ftdmchan)) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Cannot set tx gain in non-voice channel of type: %s\n", ftdm_chan_type2str(ftdmchan->type));
|
||||
GOTO_STATUS(done, FTDM_FAIL);
|
||||
}
|
||||
ftdmchan->txgain = FTDM_COMMAND_OBJ_FLOAT;
|
||||
reset_gain_table(ftdmchan->txgain_table, ftdmchan->txgain, ftdmchan->native_codec);
|
||||
if (ftdmchan->txgain == 0.0) {
|
||||
@ -2468,17 +2476,17 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_read(ftdm_channel_t *ftdmchan, void *data
|
||||
ftdm_assert_return(ftdmchan != NULL, FTDM_FAIL, "ftdmchan is null\n");
|
||||
ftdm_assert_return(ftdmchan->fio != NULL, FTDM_FAIL, "No I/O module attached to ftdmchan\n");
|
||||
|
||||
if (!ftdm_test_flag(ftdmchan, FTDM_CHANNEL_OPEN)) {
|
||||
if (!ftdm_test_flag(ftdmchan, FTDM_CHANNEL_OPEN)) {
|
||||
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "channel not open");
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
|
||||
if (!ftdmchan->fio->read) {
|
||||
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "method not implemented");
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
|
||||
status = ftdmchan->fio->read(ftdmchan, data, datalen);
|
||||
status = ftdmchan->fio->read(ftdmchan, data, datalen);
|
||||
if (ftdmchan->fds[0] > -1) {
|
||||
int dlen = (int) *datalen;
|
||||
if (write(ftdmchan->fds[0], data, dlen) != dlen) {
|
||||
|
@ -2136,23 +2136,23 @@ static ftdm_status_t ftdm_sangoma_boost_start(ftdm_span_t *span)
|
||||
|
||||
static ftdm_status_t ftdm_sangoma_boost_stop(ftdm_span_t *span)
|
||||
{
|
||||
int cnt = 10;
|
||||
ftdm_status_t status = FTDM_SUCCESS;
|
||||
ftdm_sangoma_boost_data_t *sangoma_boost_data = span->signal_data;
|
||||
if (sangoma_boost_data->sigmod) {
|
||||
|
||||
/* FIXME: we should make sure the span thread is stopped (use pthread_kill or freetdm thread kill function) */
|
||||
/* I think stopping the span before destroying the queue makes sense
|
||||
otherwise may be boost events would still arrive when the queue is already destroyed! */
|
||||
status = sangoma_boost_data->sigmod->stop_span(span);
|
||||
|
||||
ftdm_queue_enqueue(sangoma_boost_data->boost_queue, NULL);
|
||||
while(ftdm_test_flag(sangoma_boost_data, FTDM_SANGOMA_BOOST_RUNNING) && cnt-- > 0) {
|
||||
ftdm_log(FTDM_LOG_DEBUG, "Waiting for boost thread\n");
|
||||
ftdm_sleep(500);
|
||||
}
|
||||
}
|
||||
|
||||
while (ftdm_test_flag(sangoma_boost_data, FTDM_SANGOMA_BOOST_RUNNING)) {
|
||||
ftdm_log(FTDM_LOG_DEBUG, "Waiting for boost thread\n");
|
||||
ftdm_sleep(100);
|
||||
}
|
||||
|
||||
if (sangoma_boost_data->sigmod) {
|
||||
ftdm_queue_destroy(&sangoma_boost_data->boost_queue);
|
||||
return status;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
@ -944,7 +944,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_nibblebill_load)
|
||||
/* Add dialplan applications */
|
||||
SWITCH_ADD_APP(app_interface, "nibblebill", "Handle billing for the current channel/call",
|
||||
"Pause, resume, reset, adjust, flush, heartbeat commands to handle billing.", nibblebill_app_function, APP_SYNTAX,
|
||||
SAF_NONE | SAF_ROUTING_EXEC);
|
||||
SAF_SUPPORT_NOMEDIA | SAF_ROUTING_EXEC);
|
||||
|
||||
/* register state handlers for billing */
|
||||
switch_core_add_state_handler(&nibble_state_handler);
|
||||
|
@ -44,8 +44,6 @@ SWITCH_MODULE_DEFINITION(mod_loopback, mod_loopback_load, mod_loopback_shutdown,
|
||||
|
||||
static switch_endpoint_interface_t *loopback_endpoint_interface = NULL;
|
||||
|
||||
static switch_memory_pool_t *module_pool = NULL;
|
||||
|
||||
typedef enum {
|
||||
TFLAG_LINKED = (1 << 0),
|
||||
TFLAG_OUTBOUND = (1 << 1),
|
||||
@ -887,10 +885,6 @@ static switch_io_routines_t channel_io_routines = {
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_loopback_load)
|
||||
{
|
||||
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
|
||||
return SWITCH_STATUS_TERM;
|
||||
}
|
||||
|
||||
memset(&globals, 0, sizeof(globals));
|
||||
|
||||
|
@ -2727,8 +2727,6 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
|
||||
(tech_pvt->stun_flags & STUN_FLAG_FUNNY) ? 1 : 0);
|
||||
}
|
||||
|
||||
printf("WTF [%s][%s]\n", switch_channel_get_variable(tech_pvt->channel, "rtcp_audio_interval_msec"), tech_pvt->profile->rtcp_audio_interval_msec);
|
||||
|
||||
if ((val = switch_channel_get_variable(tech_pvt->channel, "rtcp_audio_interval_msec")) || (val = tech_pvt->profile->rtcp_audio_interval_msec)) {
|
||||
const char *rport = switch_channel_get_variable(tech_pvt->channel, "sip_remote_audio_rtcp_port");
|
||||
switch_port_t remote_port = 0;
|
||||
|
@ -36,7 +36,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sndfile_load);
|
||||
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_sndfile_shutdown);
|
||||
SWITCH_MODULE_DEFINITION(mod_sndfile, mod_sndfile_load, mod_sndfile_shutdown, NULL);
|
||||
|
||||
static switch_memory_pool_t *module_pool = NULL;
|
||||
|
||||
static struct {
|
||||
switch_hash_t *format_hash;
|
||||
@ -415,12 +414,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sndfile_load)
|
||||
{
|
||||
switch_file_interface_t *file_interface;
|
||||
|
||||
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
|
||||
return SWITCH_STATUS_TERM;
|
||||
}
|
||||
|
||||
switch_core_hash_init(&globals.format_hash, module_pool);
|
||||
switch_core_hash_init(&globals.format_hash, pool);
|
||||
|
||||
if (setup_formats() != SWITCH_STATUS_SUCCESS) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
@ -447,6 +441,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sndfile_load)
|
||||
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_sndfile_shutdown)
|
||||
{
|
||||
switch_core_hash_destroy(&globals.format_hash);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -398,9 +398,11 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_logfile_shutdown)
|
||||
if ((profile = (logfile_profile_t *) val)) {
|
||||
switch_file_close(profile->log_afd);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Closing %s\n", profile->logfile);
|
||||
switch_safe_free(profile->logfile);
|
||||
}
|
||||
}
|
||||
|
||||
switch_core_hash_destroy(&profile_hash);
|
||||
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -791,6 +791,7 @@ int main(int argc, char *argv[])
|
||||
destroy_status = switch_core_destroy();
|
||||
|
||||
switch_file_close(fd);
|
||||
apr_pool_destroy(pool);
|
||||
|
||||
if (unlink(pid_path) != 0) {
|
||||
fprintf(stderr, "Failed to delete pid file [%s]\n", pid_path);
|
||||
|
@ -1867,13 +1867,23 @@ SWITCH_DECLARE(switch_status_t) switch_core_destroy(void)
|
||||
switch_safe_free(SWITCH_GLOBAL_dirs.script_dir);
|
||||
switch_safe_free(SWITCH_GLOBAL_dirs.htdocs_dir);
|
||||
switch_safe_free(SWITCH_GLOBAL_dirs.grammar_dir);
|
||||
switch_safe_free(SWITCH_GLOBAL_dirs.storage_dir);
|
||||
switch_safe_free(SWITCH_GLOBAL_dirs.recordings_dir);
|
||||
switch_safe_free(SWITCH_GLOBAL_dirs.sounds_dir);
|
||||
switch_safe_free(SWITCH_GLOBAL_dirs.run_dir);
|
||||
switch_safe_free(SWITCH_GLOBAL_dirs.temp_dir);
|
||||
|
||||
switch_core_hash_destroy(&runtime.global_vars);
|
||||
switch_core_hash_destroy(&runtime.mime_types);
|
||||
|
||||
if (IP_LIST.hash) {
|
||||
switch_core_hash_destroy(&IP_LIST.hash);
|
||||
}
|
||||
|
||||
if (IP_LIST.pool) {
|
||||
switch_core_destroy_memory_pool(&IP_LIST.pool);
|
||||
}
|
||||
|
||||
if (runtime.memory_pool) {
|
||||
apr_pool_destroy(runtime.memory_pool);
|
||||
apr_terminate();
|
||||
|
@ -127,7 +127,16 @@ void *switch_dso_data_sym(switch_dso_lib_t lib, const char *sym, char **err)
|
||||
{
|
||||
void *addr = dlsym(lib, sym);
|
||||
if (!addr) {
|
||||
*err = strdup(dlerror());
|
||||
char *err_str = NULL;
|
||||
dlerror();
|
||||
|
||||
if (!(addr = dlsym(lib, sym))) {
|
||||
err_str = dlerror();
|
||||
}
|
||||
|
||||
if (err_str) {
|
||||
*err = strdup(err_str);
|
||||
}
|
||||
}
|
||||
return addr;
|
||||
}
|
||||
|
@ -788,7 +788,7 @@ static switch_status_t switch_loadable_module_load_file(char *path, char *filena
|
||||
switch_loadable_module_interface_t *module_interface = NULL;
|
||||
char *derr = NULL;
|
||||
const char *err = NULL;
|
||||
switch_memory_pool_t *pool;
|
||||
switch_memory_pool_t *pool = NULL;
|
||||
switch_bool_t load_global = global;
|
||||
|
||||
switch_assert(path != NULL);
|
||||
@ -1349,6 +1349,7 @@ SWITCH_DECLARE(void) switch_loadable_module_shutdown(void)
|
||||
switch_core_hash_destroy(&loadable_modules.management_hash);
|
||||
switch_core_hash_destroy(&loadable_modules.dialplan_hash);
|
||||
|
||||
switch_core_destroy_memory_pool(&loadable_modules.pool);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_endpoint_interface_t *) switch_loadable_module_get_endpoint_interface(const char *name)
|
||||
|
@ -1546,9 +1546,9 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_activate_rtcp(switch_rtp_t *rtp_sessi
|
||||
|
||||
if (send_rate == -1) {
|
||||
switch_set_flag(rtp_session, SWITCH_RTP_FLAG_RTCP_PASSTHRU);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "RTCP passthru enabled. Remote Port: %d\n", rtp_session->remote_rtcp_port);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "RTCP passthru enabled. Remote Port: %d\n", rtp_session->remote_rtcp_port);
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "RTCP send rate is: %d and packet rate is: %d Remote Port: %d\n",
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "RTCP send rate is: %d and packet rate is: %d Remote Port: %d\n",
|
||||
send_rate, rtp_session->ms_per_packet, rtp_session->remote_rtcp_port);
|
||||
rtp_session->rtcp_interval = send_rate/(rtp_session->ms_per_packet/1000);
|
||||
}
|
||||
|
@ -1064,6 +1064,10 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(softtimer_shutdown)
|
||||
switch_core_destroy_memory_pool(&TIMEZONES_LIST.pool);
|
||||
}
|
||||
|
||||
if (NODE) {
|
||||
switch_event_unbind(&NODE);
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user