[asterisk-users] Queues with unavailable members

C. Chad Wallace cwallace at lodgingcompany.com
Thu Oct 15 13:56:33 CDT 2009


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20091015/6ca4e9e2/attachment.pgp 


More information about the asterisk-users mailing list