New penalty function for Asterisk Queue
This patch was developed because Asterisk was missing a ACD feature that our customer has on their previous IVR system. The feature is that if a person(read: agent) goes away from his/her phone, and forgets to log out from the queue, the agent gets ‘paused’ for a specific amount of ‘penalty’-time, where the agent won’t receive any more call attempts. This is almost like the “autopause” function, already present in Asterisk. Except that this one will unpause the user again after a given amount of time.
Lets say we have 3 agents in a queue.. The two first agents have priority 1, and the last one has priority 2. This means that as long as one of the first two agents are off their phones, the queue system will try to call those phones. It will not go to priority 2 unless both agents are busy on their phones, because, they’re free, right? With my patch, the two first agents are temporarily removed from the queue after they don’t answer before the timeout specified for the queue. Now the queue system will try agents in priority 2 automatically. This way, people who wait in line for an agent doesn’t have to wait for ages because one agent forgot to log off.
To accomplish this, I note the time when a member fails to answer his phone in time, and then neglects to call him anymore until (current time – no-answer time) is more than X seconds.
The amount of seconds to wait is defined in queues.conf with the new notpresent-penalty option, or in a realtime database, by a integer field with the name notpresent_penalty.
You can find the patch at Asterisks issue tracker