[Asterisk-code-review] app queue: Add option for predial handlers on caller and cal... (asterisk[master])

Richard Mudgett asteriskteam at digium.com
Tue Jun 19 13:17:37 CDT 2018


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/9180 )

Change subject: app_queue: Add option for predial handlers on caller and callee channels
......................................................................


Patch Set 1: Code-Review-1

(4 comments)

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

https://gerrit.asterisk.org/#/c/9180/1//COMMIT_MSG@9
PS1, Line 9: ASTERISK-27912: Add predial handler to app_queue
           : app_dial (ASTERISK-19548) and app_originate (ASTERISK-26587) have the
See https://wiki.asterisk.org/wiki/display/AST/Commit+Messages about how a commit message should look.

When you reference another issue that is related you should use something other than the '-' in the issue id.  I recommend substituting '_' in place of the '-'.  The gerrit plugin is really stupid and will close ANY issue identifiers it finds in your commit message.


https://gerrit.asterisk.org/#/c/9180/1/apps/app_queue.c
File apps/app_queue.c:

https://gerrit.asterisk.org/#/c/9180/1/apps/app_queue.c@4592
PS1, Line 4592: 		ast_replace_subargument_delimiter(opt_args[OPT_ARG_PREDIAL_CALLEE]);
Calling this only needs to be done once on starting the application.


https://gerrit.asterisk.org/#/c/9180/1/apps/app_queue.c@4653
PS1, Line 4653: 	while (ret == 0) {
Look at app_followme for how callee pre-dial things were done there.  You need to put the caller and any already called members into autoservice if you have a pre-dial routine configured for the callees.  You DO NOT know how long the pre-dial routine will take to execute.

When you initiate a new call to a member you need to put that channel into autoservice when ring_entry() returns.

When this routine returns you need to take all channels that you have placed into autoservice out of autoservice.


https://gerrit.asterisk.org/#/c/9180/1/apps/app_queue.c@8324
PS1, Line 8324: 	/* PREDIAL: Run gosub on the caller's channel */
              : 	if (ast_test_flag(&opts, OPT_PREDIAL_CALLER)
              : 		&& !ast_strlen_zero(opt_args[OPT_ARG_PREDIAL_CALLER])) {
              : 		ast_replace_subargument_delimiter(opt_args[OPT_ARG_PREDIAL_CALLER]);
              : 		ast_app_exec_sub(NULL, chan, opt_args[OPT_ARG_PREDIAL_CALLER], 0);
              : 	}
              : 
This code can get executed several times which means that the pre-dial routine on the caller's channel can get executed several times.  This code should be moved to before the check_turns label and best right after the ast_queue_log() call there.



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5acf5c32587ee008658d12e8a8049eb8fa4d0f24
Gerrit-Change-Number: 9180
Gerrit-PatchSet: 1
Gerrit-Owner: Kristian Høgh <kfh at uni-tel.dk>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Tue, 19 Jun 2018 18:17:37 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180619/3fe004fa/attachment-0001.html>


More information about the asterisk-code-review mailing list