Getting the last event from the dialplan when exiting a queu

Should this be included in the official release

  • yes
  • no

0 voters

This might be more a topic for the development ?

I have a system where a call enters in a first queue with ring and exits after 20 seconds to enter a queue with MOH.

In order to prevent the call entering the second queue when it was already answered in the first queue I need to test in the dialplan the last event that occurred. The call can continue if it exists the first queue on time-out but not if it was with completecaller/agent or any other event.

Up to now I have not found a way to recuperate the last event in the dialplan other that modifying the app_queue.c code and set a variable myself. (after each log entry creation)

Questions:

Does anybody else has this problem ?
If so, how did he solve it ?

If my solution is correct, should this be included in the official release ?

Can you get what you are looking for by looking at the QUEUESTATUS channel variable after the 1st queue?