Sorvani, thanks for the code location reference.
I don’t think reversing 1 and 2 would do it, as the instruction for 2 is dependent upon the PAUSE_STATE set during 1 to determine which message to play.
Next is to figure out what to modify, and where to put it to trigger an appropriate response whenever the toggle command has been initiated by a queue agent that was paused.
I can see the referenced “/etc/asterisk/extensions_additional.conf” file is one that is protected from editing. I’ve also noted how in the “app-queue-pause-toggle-custom” section of that file there is an “include” statement, this would be the address where a modification could be inserted. At the top of this file it shows “globals_custom.conf” as an included location in which I could place a modified [app-queue-pause-toggle-custom] to run from the above-mentioned include line in [app-queue-pause-toggle].
With this info I should be able to ferret out how to rewrite the existing instruction to prevent it from doubling-down and pausing the agent again. Then add a GoTo (or asterisk equivalent) pointing to the following [app-all-queue-pause-toggle] section, skipping the [app-queue-pause-toggle] instructions that exist after the “include” line.
A little trial and error should turn up the right set of modifications to make this work.
If successful, I’ll post up the script that solves it.