via: 687d39f259cf62bea5c6508acd76d8732dcc0e11 (commit)
from: c18835d3f919c7ba260dfa0e61254fb305850518 (commit)
= COMMIT LOG ===========================================================
committer: Moises Silva
comments:
freetdm: ftmod_analog - Add timeout parameter for dial tone. 0 means not waiting for dial tone.
diff --git a/libs/freetdm/conf/freetdm.conf.xml b/libs/freetdm/conf/freetdm.conf.xml
index 43197af..7d5de5a 100644
--- a/libs/freetdm/conf/freetdm.conf.xml
+++ b/libs/freetdm/conf/freetdm.conf.xml
@@ -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"/>-->
diff --git a/libs/freetdm/mod_freetdm/mod_freetdm.c b/libs/freetdm/mod_freetdm/mod_freetdm.c
index 4dc6cfc..b746f51 100755
--- a/libs/freetdm/mod_freetdm/mod_freetdm.c
+++ b/libs/freetdm/mod_freetdm/mod_freetdm.c
@@ -2790,6 +2790,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;
@@ -2830,6 +2831,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")) {
@@ -2930,6 +2933,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;
diff --git a/libs/freetdm/src/ftmod/ftmod_analog/ftmod_analog.c b/libs/freetdm/src/ftmod/ftmod_analog/ftmod_analog.c
index 818f1c5..d25d38f 100644
--- a/libs/freetdm/src/ftmod/ftmod_analog/ftmod_analog.c
+++ b/libs/freetdm/src/ftmod/ftmod_analog/ftmod_analog.c
@@ -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;
Summary of changes: libs/freetdm/conf/freetdm.conf.xml | 3 +++ libs/freetdm/mod_freetdm/mod_freetdm.c | 4 ++++ libs/freetdm/src/ftmod/ftmod_analog/ftmod_analog.c | 2 +- 3 files changed, 8 insertions(+), 1 deletions(-)
this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email
For more info, see http://blog.chomperstomp.com/?p=630
--
FreeSWITCH Source