Using Time as a Parameter w/ Penalty

We are wanting to set up our agents in the penalty based on time. For example, we have 3 agents with one who is on the phone full time and the other two who are on the phone full time for half the day. For the two half day people we are wanting them in the penalty for times they are not assigned to. One agent would be in the penalty from 8AM-12PM and the other from 12PM-5PM. Is this possible to configure using the penalty or is there another configuration that would work better?

Can’t you let the agents login/logout to queue when they arrive or leave.
Even with the penalty their phone will ring!

The point of the penalty is I don’t want the third person picking up the call on the first ring wave. I just want them to be in the penalty for half the day. They would act as a back up if all agents are currently assisting people on the phone.

I suggest that if the person 1 or 2 arrives at the office, he picks up the phone and add himself to the queue by dialing in my example 30001. When the person leaves, he dials 300011 so that his phone gets removed from the queue.

His penalty is 0, so his phone will always ring first, if he added himself to the queue. If he is not at the queue, the third person his phone will ring.

music = default
announce = q-sample-announce
strategy = roundrobin
timeout = 60
retry = 5
maxlen = 0
announce-frequency = 0
announce-holdtime = no

Agent 301 and Agent 302 will be the persons that only work half the day. Agent 303 works the whole day.

In your extension.conf you put something like this

exten => s,1,Set(agent=${ARG1})
exten => s,n,Set(queue=${ARG2})
exten => s,n,NoOp(Queue login agent ${agent} to queue ${phone});
exten => s,n,AddQueueMember(${queue},SIP/${agent});
exten => s,n,Playback(agent-loginok)

exten => s,1,Set(agent=${ARG1})
exten => s,n,Set(queue=${ARG2})
exten => s,n,NoOp(Queue logout agent ${agent} from queue ${phone});
exten => s,n,RemoveQueueMember(${queue},SIP/${agent});
exten => s,n,Playback(agent-loggedoff)


exten => _3XXX1,1,Answer
exten => _3XXX1,n,Read(Agent,Agent-user)
exten => _3XXX1,n,Macro(queue-login,${Agent},${EXTEN:0:4})
exten => _3XXX1,n,Hangup

exten => _3XXX11,1,Answer
exten => _3XXX11,n,Read(Agent,Agent-user)
exten => _3XXX11,n,Macro(queue-logout,${Agent},${EXTEN:0:4})
exten => _3XXX11,n,Hangup

This example is on