sig_analog: Allow three-way flash to time out to silence.

sig_analog allows users to flash and use the three-way dial
tone as a primitive hold function, simply by never timing
it out.

Some systems allow this dial tone to time out to silence,
so the user is not annoyed by a persistent dial tone.
This option allows the dial tone to time out normally to
silence.

ASTERISK-30004 #close
Resolves: #205

UserNote: The threewaysilenthold option now allows the three-way
dial tone to time out to silence, rather than continuing forever.
This commit is contained in:
Naveen Albert
2023-07-10 18:53:43 +00:00
committed by asterisk-org-access-app[bot]
parent f335da6b74
commit e1a1ae933b
5 changed files with 25 additions and 3 deletions

View File

@@ -2166,8 +2166,9 @@ static void *__analog_ss_thread(void *data)
/* Read the first digit */
timeout = analog_get_firstdigit_timeout(p);
/* If starting a threeway call, never timeout on the first digit so someone
can use flash-hook as a "hold" feature */
if (p->subs[ANALOG_SUB_THREEWAY].owner) {
* can use flash-hook as a "hold" feature...
* ...Unless three-way dial tone should time out to silence, in which case the default suffices. */
if (!p->threewaysilenthold && p->subs[ANALOG_SUB_THREEWAY].owner) {
timeout = INT_MAX;
}
while (len < AST_MAX_EXTENSION-1) {
@@ -2249,7 +2250,11 @@ static void *__analog_ss_thread(void *data)
}
} else if (res == 0) {
ast_debug(1, "not enough digits (and no ambiguous match)...\n");
res = analog_play_tone(p, idx, ANALOG_TONE_CONGESTION);
if (p->threewaysilenthold) {
ast_debug(1, "Nothing dialed at three-way dial tone, timed out to silent hold\n");
} else {
res = analog_play_tone(p, idx, ANALOG_TONE_CONGESTION);
}
analog_wait_event(p);
ast_hangup(chan);
goto quit;