[Asterisk-code-review] app dial: Add the "Q" option to set the cause on unanswered... (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Thu Oct 6 17:07:34 CDT 2016


Richard Mudgett has posted comments on this change.

Change subject: app_dial:  Add the "Q" option to set the cause on unanswered channels
......................................................................


Patch Set 1: Code-Review-1

(7 comments)

https://gerrit.asterisk.org/#/c/4033/1//COMMIT_MSG
Commit Message:

PS1, Line 11: ANSWERED_ELSEWHERE.
            : 
            : Change-Id: I71742e0919aaa16784c30a2b2e73fbeed7672e47
Need add issue tag


https://gerrit.asterisk.org/#/c/4033/1/apps/app_dial.c
File apps/app_dial.c:

Line 388: 						See the <literal>causes.h</literal> file for the full list of valid causes.
This is the same value you can give to the Hangup application.


Line 2797: 			if (!strcmp(opt_args[OPT_ARG_HANGUPCAUSE], "NONE")) {
Use strcasecmp() since ast_str2cause() is not case sensitive.


Line 2800: 				cause = ast_str2cause(opt_args[OPT_ARG_HANGUPCAUSE]);
Check if returned -1 and issue a warning about the user's typing/spelling.

Should do the same string conversion as pbx_builtin_hangup() by accepting either a name string or numeric code.


Line 3209: 	hanguptree(&out_chans, NULL,
I wonder if we should propagate the Q() cause if we get that cause.  This is an interaction between the Q() option and the default propagation of the answered elsewhere cause and the "c" option.


Line 3210: 		ast_channel_hangupcause(chan)==AST_CAUSE_ANSWERED_ELSEWHERE
spaces around == operator


Line 3211: 		|| ast_test_flag64(&opts, OPT_CANCEL_ELSEWHERE) ? AST_CAUSE_ANSWERED_ELSEWHERE : 0 ); /* forward 'answered elsewhere' if we received it */
Extra space before ) at end of line.

Should move the EOL comment to its own line before the hangupcause() call to shorten the line length.


-- 
To view, visit https://gerrit.asterisk.org/4033
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I71742e0919aaa16784c30a2b2e73fbeed7672e47
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list