[svn-commits] mmichelson: branch 10 r372049 - in /branches/10: ./ apps/app_queue.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Aug 30 13:33:41 CDT 2012
Author: mmichelson
Date: Thu Aug 30 13:33:37 2012
New Revision: 372049
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=372049
Log:
Help prevent ringing queue members from being rung when ringinuse set to no.
Queue member status would not always get updated properly when the member
was called, thus resulting in the member getting multiple calls. With this
change, we update the member's status at the time of calling, and we also
check to make sure the member is still available to take the call before
placing an outbound call.
(closes issue ASTERISK-16115)
reported by nik600
Patches:
app_queue.c-svn-r370418.patch uploaded by Italo Rossi (license #6409)
........
Merged revisions 372048 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Modified:
branches/10/ (props changed)
branches/10/apps/app_queue.c
Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: branches/10/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/apps/app_queue.c?view=diff&rev=372049&r1=372048&r2=372049
==============================================================================
--- branches/10/apps/app_queue.c (original)
+++ branches/10/apps/app_queue.c Thu Aug 30 13:33:37 2012
@@ -3217,10 +3217,19 @@
ast_channel_unlock(tmp->chan);
ast_channel_unlock(qe->chan);
- /* Place the call, but don't wait on the answer */
- if ((res = ast_call(tmp->chan, location, 0))) {
+ ao2_lock(tmp->member);
+ update_status(qe->parent, tmp->member, get_queue_member_status(tmp->member));
+ if (!qe->parent->ringinuse && (tmp->member->status != AST_DEVICE_NOT_INUSE) && (tmp->member->status != AST_DEVICE_UNKNOWN)) {
+ ast_verb(1, "Member %s is busy, cannot dial", tmp->member->interface);
+ res = -1;
+ }
+ else {
+ /* Place the call, but don't wait on the answer */
+ res = ast_call(tmp->chan, location, 0);
+ }
+ ao2_unlock(tmp->member);
+ if (res) {
/* Again, keep going even if there's an error */
- ast_debug(1, "ast call on peer returned %d\n", res);
ast_verb(3, "Couldn't call %s\n", tmp->interface);
do_hang(tmp);
(*busies)++;
More information about the svn-commits
mailing list