How to create a script who watch a queue waiting time

Hi All,

I’m new to asterisk and want to create a script who make a specific action (ie : call a number, make a http hit, …) when the waiting time on a queue exceed a specific duration (ie : 60s).

Is it possible to create such kind of daemon ?

Where do i start ?

Regards,

Dominique

To better answer, say what purpose of that.

I’d suggest using AMI to watch for the event QueueCallerJoin and then start a timer and react as needed.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+ManagerEvent_QueueCallerJoin

Run an script in a cron job every 1 minute, and if waiting time match use curl to reach the remote url

Dear przeqpiciel,

My aim is to change the state of a virtual agent to busy when the queue waiting time exceed a specific duration.

Regards,

Maybe you should use queuerules?

  1. set penalty for you virtual agent and normal agents
  2. set queuerules (if caller wait for X seconds than change penalty range)

If you did that you will achieve this same. Your virtual agent will not take any calls with X seconds of waiting

1 Like