freetdm: ftmod_analog - Add timeout parameter for dial tone. 0 means not waiting for dial tone.
This commit is contained in:
parent
c18835d3f9
commit
687d39f259
|
@ -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"/>-->
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue