[asterisk-dev] Adding wrapup as a queue member state to enable modifying/logging etc

Mark Michelson mmichelson at digium.com
Tue Feb 17 15:48:52 CST 2009


Fredrik Liljegren wrote:
> Hello.
> 
> Today, wrapup is a time set on a queue, that is checked when a new queue
> call comes in to make sure the queue member has had the full wrapup time
> (for the last queue) from last call.
> 
> I want to rewrite that, so that wrapup is more like a state.
> 
> When a queue call is ended, the queue member is put in wrapup, recording
> the time when the wrapup is supposed to end (calculated from now +
> queues wrapuptime).
> 
> When wrapup is due to end, the variable is reset, a manager event is
> sent, a queue_log entry is made (configurable).
> 
> The wrapup time is accessible from function
> QUEUE_MEMBER_WRAPUP(<interface>) that would return time left to the end,
> and a similar manager action, and where you can change that time.
> 
> 
> This makes several things easier when handling call queues:
> 
>  * With a manager, it's easy to display to a queue member that he's in
> wrapup and remove it when it ends.
>  * The queue member can end or prolong the wrapup.
>  * You can get statistics of the actual time a queue member's been in
> wrapup, and for what queues they've needed least/most wrapup time.
> 
> 
> These are not unusual things to want.. se e.g. the
> dialplan/db-implementation of some of this functionality:
> http://www.voip-info.org/wiki/view/Agents+without+agent+channel+Asterisk+1.4+AEL
> 
> 
> 
> Please comment the usage-design... I'm quite new to actually programming
> in asterisk.
> 
> /Fredrik (fiddur on irc/mantis..)
> 

Everything you've said here makes good sense to me, and I am looking forward to 
seeing how you implement it. A few things to keep in mind:

Currently we determine if we are in the wrapuptime for a queue member based on 
how long ago he completed his last call. When you are changing the wrapuptime 
logic, be sure not to mess with the lastcall field of a member, since this 
information can be useful for other purposes, like with the leastrecent strategy.

Be sure to understand what sharedlastcall is for a queue and take into account 
whether this has been set or not when making your changes.

I'm looking forward to seeing your changes!

Mark Michelson



More information about the asterisk-dev mailing list