mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-17 06:48:33 +00:00
Merge remote branch 'fsorig/master'
This commit is contained in:
commit
865d04ef2f
103 files changed
+3207
-2261
No files matched your search
@@ -61,7 +61,7 @@ LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) $(FTDM_CFLAGS) $(LDFLAGS) -o $
|
||||
#
|
||||
EXTRA_DIST = freetdm.pc.in
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfigdir = @pkgconfigdir@
|
||||
pkgconfig_DATA = freetdm.pc
|
||||
|
||||
|
||||
|
||||
@@ -54,6 +54,9 @@ with the signaling protocols that you can run on top of your I/O interfaces.
|
||||
<!-- whether you want to wait for caller id -->
|
||||
<param name="enable-callerid" value="true"/>
|
||||
|
||||
<!-- How much to wait for dial tone (0 if you just want to dial out immediately without waiting for dial tone) -->
|
||||
<!--<param name="wait-dialtone-timeout" value="5000"/>-->
|
||||
|
||||
<!-- whether you want to enable callwaiting feature -->
|
||||
<!--<param name="callwaiting" value="true"/>-->
|
||||
|
||||
|
||||
@@ -65,6 +65,18 @@ AC_ARG_WITH([modinstdir],
|
||||
)
|
||||
AC_SUBST([modinstdir])
|
||||
|
||||
# freetdm.pc pkgconfig file
|
||||
AC_ARG_WITH([pkgconfigdir],
|
||||
[AS_HELP_STRING([--with-pkgconfigdir=DIR], [Installation directory for pkgconfig file (default: ${libdir}/pkgconfig)])],
|
||||
[case "${withval}" in
|
||||
yes|no) AC_MSG_ERROR([Invalid value ${withval} for option --with-pkgconfigdir]) ;;
|
||||
*) pkgconfigdir="${withval}" ;;
|
||||
esac
|
||||
],
|
||||
[pkgconfigdir="${libdir}/pkgconfig"]
|
||||
)
|
||||
AC_SUBST([pkgconfigdir])
|
||||
|
||||
AC_ARG_ENABLE([enable_64],
|
||||
[AS_HELP_STRING([--enable-64], [Enable 64bit compilation])],
|
||||
[enable_64="${enableval}"],
|
||||
|
||||
@@ -2780,6 +2780,7 @@ static switch_status_t load_config(void)
|
||||
const char *hangup_polarity = "false";
|
||||
int polarity_delay = 600;
|
||||
int callwaiting = 1;
|
||||
int dialtone_timeout = 5000;
|
||||
|
||||
uint32_t span_id = 0, to = 0, max = 0;
|
||||
ftdm_span_t *span = NULL;
|
||||
@@ -2820,6 +2821,8 @@ static switch_status_t load_config(void)
|
||||
tonegroup = val;
|
||||
} else if (!strcasecmp(var, "digit_timeout") || !strcasecmp(var, "digit-timeout")) {
|
||||
digit_timeout = val;
|
||||
} else if (!strcasecmp(var, "wait-dialtone-timeout")) {
|
||||
dialtone_timeout = atoi(val);
|
||||
} else if (!strcasecmp(var, "context")) {
|
||||
context = val;
|
||||
} else if (!strcasecmp(var, "dialplan")) {
|
||||
@@ -2920,6 +2923,7 @@ static switch_status_t load_config(void)
|
||||
"hangup_polarity_reverse", hangup_polarity,
|
||||
"polarity_delay", &polarity_delay,
|
||||
"callwaiting", &callwaiting,
|
||||
"wait_dialtone_timeout", &dialtone_timeout,
|
||||
FTDM_TAG_END) != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error configuring FreeTDM analog span %s\n", ftdm_span_get_name(span));
|
||||
continue;
|
||||
|
||||
+18
-10
@@ -2335,7 +2335,7 @@ FT_DECLARE(ftdm_status_t) _ftdm_channel_call_indicate(const char *file, const ch
|
||||
break;
|
||||
case FTDM_CHANNEL_INDICATE_PROCEED:
|
||||
if (!ftdm_test_flag(ftdmchan->span, FTDM_SPAN_USE_PROCEED_STATE) ||
|
||||
ftdmchan->state == FTDM_CHANNEL_STATE_PROCEED) {
|
||||
ftdmchan->state >= FTDM_CHANNEL_STATE_PROCEED) {
|
||||
ftdm_ack_indication(ftdmchan, indication, status);
|
||||
goto done;
|
||||
}
|
||||
@@ -2411,11 +2411,6 @@ static ftdm_status_t _ftdm_channel_call_place_nl(const char *file, const char *f
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (ftdmchan->state != FTDM_CHANNEL_STATE_DOWN) {
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, "Cannot place call in channel in state %s!\n", ftdm_channel_state2str(ftdmchan->state));
|
||||
goto done;
|
||||
}
|
||||
|
||||
status = ftdmchan->span->outgoing_call(ftdmchan);
|
||||
if (status == FTDM_BREAK) {
|
||||
/* the signaling module detected glare on time */
|
||||
@@ -5542,17 +5537,30 @@ FT_DECLARE(ftdm_status_t) ftdm_global_init(void)
|
||||
ftdm_mutex_create(&globals.call_id_mutex);
|
||||
|
||||
ftdm_sched_global_init();
|
||||
globals.running = 1;
|
||||
if (ftdm_sched_create(&globals.timingsched, "freetdm-master") != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_CRIT, "Failed to create master timing schedule context\n");
|
||||
return FTDM_FAIL;
|
||||
goto global_init_fail;
|
||||
}
|
||||
if (ftdm_sched_free_run(globals.timingsched) != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_CRIT, "Failed to run master timing schedule context\n");
|
||||
return FTDM_FAIL;
|
||||
goto global_init_fail;
|
||||
}
|
||||
|
||||
globals.running = 1;
|
||||
|
||||
return FTDM_SUCCESS;
|
||||
|
||||
global_init_fail:
|
||||
globals.running = 0;
|
||||
ftdm_mutex_destroy(&globals.mutex);
|
||||
ftdm_mutex_destroy(&globals.span_mutex);
|
||||
ftdm_mutex_destroy(&globals.group_mutex);
|
||||
ftdm_mutex_destroy(&globals.call_id_mutex);
|
||||
hashtable_destroy(globals.interface_hash);
|
||||
hashtable_destroy(globals.module_hash);
|
||||
hashtable_destroy(globals.span_hash);
|
||||
hashtable_destroy(globals.group_hash);
|
||||
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
|
||||
FT_DECLARE(ftdm_status_t) ftdm_global_configuration(void)
|
||||
|
||||
@@ -182,7 +182,7 @@ static FIO_SIG_CONFIGURE_FUNCTION(ftdm_analog_configure_span)
|
||||
const char *tonemap = "us";
|
||||
const char *hotline = "";
|
||||
uint32_t digit_timeout = 10;
|
||||
uint32_t wait_dialtone_timeout = 30000;
|
||||
uint32_t wait_dialtone_timeout = 5000;
|
||||
uint32_t max_dialstr = MAX_DTMF;
|
||||
uint32_t polarity_delay = 600;
|
||||
const char *var, *val;
|
||||
|
||||
@@ -649,7 +649,7 @@ void sngisdn_process_rel_ind (sngisdn_event_data_t *sngisdn_event)
|
||||
break;
|
||||
case FTDM_CHANNEL_STATE_TERMINATING:
|
||||
if (sngisdn_test_flag(sngisdn_info, FLAG_GLARE) &&
|
||||
sngisdn_info->glare.suInstId != suInstId) {
|
||||
sngisdn_info->glare.suInstId != suInstId) {
|
||||
/* This release if for the outbound call that we already started clearing */
|
||||
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "Received RELEASE for local glared call\n");
|
||||
@@ -667,7 +667,6 @@ void sngisdn_process_rel_ind (sngisdn_event_data_t *sngisdn_event)
|
||||
default:
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_CRIT, "Received RELEASE in an invalid state (%s)\n",
|
||||
ftdm_channel_state2str(ftdmchan->state));
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user