At 11:32 AM on 15 Oct 2009, C. Chad Wallace wrote:
> At 3:37 PM on 15 Oct 2009, Benny Amorsen wrote:
>
> > Perhaps the problem could be restated in a different way: After a
> > queue member rejects a call (instead of just not answering), the
> > queue should wait X amount of time before sending the next call.
> > Queues.conf has a million settings, but I can't find one which does
> > this.
>
> To pause an agent, store the "unpause time" per agent in the AstDB.
> Then when you're deciding whether to give out a call (in the Local
> channel), look up "${DB(AgentPaused/<agentid>)}" and compare it to the
> current time. If there is no record or the time has passed, put the
> call through; otherwise, skip that agent.
>
> Sorry, no example code yet... I just wanted to get the idea out
> there.
OK, I decided to write it up in AEL. It's incomplete and untested, but
it probably gets the idea across a little better.
context agentcalls {
_2XX => {
Set(AGENT=${EXTEN}); // Assuming agent ID is extension.
if (${EPOCH}>${DB(AgentPaused/${AGENT})}) {
// Let the call through to the cell phone
Dial(...);
if (<cell call was rejected>) {
// Flag agent as paused for the next 30 seconds.
Set(DB(AgentPaused/${AGENT})=$[${EPOCH}+30]);
};
}
else {
// Agent still paused.
};
};
};
--
C. Chad Wallace, B.Sc.
The Lodging Company
http://www.skihills.com/
OpenPGP Public Key ID: 0x262208A0
signature.asc
Description: PGP signature
_______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
