[asterisk-users] Realtime Queue - changing strategy to linear needs Asterisk restart

Richard Mudgett rmudgett at digium.com
Tue Nov 8 10:38:52 CST 2011


> We have realtime queue architecture on asterisk 1.8.7.0
> I noticed that when we change strategy from any other to 'linear' it
> requires Asterisk restart take the change in effect.
> I have one realtime queue '1' with strategy set to 'ringall' and I
> change its strategy to 'linear'. Now when check on Asterisk CLI it
> shows me warning given below.
> 
> demo*CLI> queue show 1
> 1 has 0 calls (max 500) in 'ringall' strategy (0s holdtime, 0s
> talktime), W:1, C:0, A:0, SL:0.0% within 100s
> No Members
> No Callers
> 
> [Nov 8 12:10:18] WARNING[4887]: app_queue.c:2034 queue_set_param:
> Changing to the linear strategy currently requires asterisk to be
> restarted.
> [Nov 8 12:10:18] WARNING[4887]: app_queue.c:2034 queue_set_param:
> Changing to the linear strategy currently requires asterisk to be
> restarted.
> 
> 
> This behaviour doesn't happen when strategy changed to other than
> 'linear'.
> So why is Asterisk restart needed for this change?
> 
Because the creation of the queue members container requires different
properties for linear support.

	if (q->strategy == QUEUE_STRATEGY_LINEAR || q->strategy == QUEUE_STRATEGY_RRORDERED)
		/* linear strategy depends on order, so we have to place all members in a single bucket */
		q->members = ao2_container_alloc(1, member_hash_fn, member_cmp_fn);
	else
		q->members = ao2_container_alloc(37, member_hash_fn, member_cmp_fn);

The other strategies will work with the linear version of the container
but are just not as efficient.

Richard



More information about the asterisk-users mailing list