[asterisk-bugs] [JIRA] (ASTERISK-29204) Directory Application doesn't immedietly accept selection

Michael (JIRA) noreply at issues.asterisk.org
Tue Dec 8 14:45:16 CST 2020


     [ https://issues.asterisk.org/jira/browse/ASTERISK-29204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael updated ASTERISK-29204:
-------------------------------

    Attachment: app_directory.patch

> Directory Application doesn't immedietly accept selection
> ---------------------------------------------------------
>
>                 Key: ASTERISK-29204
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29204
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_directory
>    Affects Versions: 13.38.0, 18.1.0
>            Reporter: Michael
>            Severity: Minor
>              Labels: patch
>         Attachments: app_directory.patch
>
>
> When using the Directory app with options:
> - 'm' to select from menu
> - 'e' also read the extension number to the caller
> When pressing a digit to select, while hearing the recorded name or character by character, the selection is not accepted because it just goes on to playing the extension due to option 'e'.
> suggestion patch:
> --- apps/app_directory.c.old	2020-11-19 07:39:40.000000000 -0500
> +++ apps/app_directory.c	2020-12-08 15:37:29.118784496 -0500
> @@ -296,13 +296,20 @@ static int play_mailbox_owner(struct ast
>  	if (res >= 0) {
>  		ast_stopstream(chan);
>  		/* If Option 'e' was specified, also read the extension number with the name */
> -		if (ast_test_flag(flags, OPT_SAYEXTENSION)) {
> +		if (res > 0 && ast_test_flag(flags, OPT_SAYEXTENSION)) {
>  			ast_stream_and_wait(chan, "vm-extension", AST_DIGIT_ANY);
> -			res = ast_say_character_str(chan, ext, AST_DIGIT_ANY, ast_channel_language(chan), AST_SAY_CASE_NONE);
> +			ast_say_character_str(chan, ext, AST_DIGIT_ANY, ast_channel_language(chan), AST_SAY_CASE_NONE);
> +		} else {
> +			ast_stream_and_wait(chan, "vm-extension", AST_DIGIT_ANY);
> +			ast_say_character_str(chan, ext, AST_DIGIT_ANY, ast_channel_language(chan), AST_SAY_CASE_NONE);
>  		}
>  	} else {
>  		res = ast_say_character_str(chan, S_OR(name, ext), AST_DIGIT_ANY, ast_channel_language(chan), AST_SAY_CASE_NONE);
> -		if (!ast_strlen_zero(name) && ast_test_flag(flags, OPT_SAYEXTENSION)) {
> +		/* If Option 'e' was specified, also read the extension number with the name */
> +		if (res > 0 && !ast_strlen_zero(name) && ast_test_flag(flags, OPT_SAYEXTENSION)) {
> +			ast_stream_and_wait(chan, "vm-extension", AST_DIGIT_ANY);
> +			ast_say_character_str(chan, ext, AST_DIGIT_ANY, ast_channel_language(chan), AST_SAY_CASE_NONE);
> +		} else {
>  			ast_stream_and_wait(chan, "vm-extension", AST_DIGIT_ANY);
>  			res = ast_say_character_str(chan, ext, AST_DIGIT_ANY, ast_channel_language(chan), AST_SAY_CASE_NONE);
>  		}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list