@ -2477,7 +2477,6 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
ast_set_flag ( & ( bridge_config . features_caller ) , AST_FEATURE_DISCONNECT ) ;
ast_set_flag ( & ( bridge_config . features_caller ) , AST_FEATURE_DISCONNECT ) ;
break ;
break ;
case ' n ' :
case ' n ' :
if ( ( now - qe - > start > = qe - > parent - > timeout ) )
* go_on = 1 ;
* go_on = 1 ;
break ;
break ;
case ' i ' :
case ' i ' :
@ -3650,6 +3649,17 @@ check_turns:
stat = get_member_status ( qe . parent , qe . max_penalty ) ;
stat = get_member_status ( qe . parent , qe . max_penalty ) ;
/* exit after 'timeout' cycle if 'n' option enabled */
if ( go_on ) {
if ( option_verbose > 2 )
ast_verbose ( VERBOSE_PREFIX_3 " Exiting on time-out cycle \n " ) ;
ast_queue_log ( args . queuename , chan - > uniqueid , " NONE " , " EXITWITHTIMEOUT " , " %d " , qe . pos ) ;
record_abandoned ( & qe ) ;
reason = QUEUE_TIMEOUT ;
res = 0 ;
break ;
}
/* leave the queue if no agents, if enabled */
/* leave the queue if no agents, if enabled */
if ( qe . parent - > leavewhenempty & & ( stat = = QUEUE_NO_MEMBERS ) ) {
if ( qe . parent - > leavewhenempty & & ( stat = = QUEUE_NO_MEMBERS ) ) {
record_abandoned ( & qe ) ;
record_abandoned ( & qe ) ;
@ -3699,17 +3709,7 @@ check_turns:
qe . digits , qe . pos , qe . opos , ( long ) time ( NULL ) - qe . start ) ;
qe . digits , qe . pos , qe . opos , ( long ) time ( NULL ) - qe . start ) ;
break ;
break ;
}
}
/* exit after 'timeout' cycle if 'n' option enabled */
if ( go_on ) {
if ( option_verbose > 2 )
ast_verbose ( VERBOSE_PREFIX_3 " Exiting on time-out cycle \n " ) ;
ast_queue_log ( args . queuename , chan - > uniqueid , " NONE " , " EXITWITHTIMEOUT " , " %d|%d|%ld " ,
qe . pos , qe . opos , ( long ) time ( NULL ) - qe . start ) ;
record_abandoned ( & qe ) ;
reason = QUEUE_TIMEOUT ;
res = 0 ;
break ;
}
/* Since this is a priority queue and
/* Since this is a priority queue and
* it is not sure that we are still at the head
* it is not sure that we are still at the head
* of the queue , go and check for our turn again .
* of the queue , go and check for our turn again .