Modify [app-queue-toggle] to write to queue_log

I use Queuemetrics to monitor our call queue. In order to be able to track agent availability, QM requires that you write information to the Queue Log, either using the QueueLog application or the System command combined with echo, like this:

exten => _422XX,3,System( echo "${EPOCH}|${UNIQUEID}|NONE|SIP/${EXTEN:3}|\ AGENTLOGIN|-" >> /var/log/asterisk/queue_log )

The folks at QM suggest using their own login/logout context, but I am reluctant to do that for fear of breaking the way that FreePBX handles queues (things like not sending multiple queue calls to phones with call-waiting). So, I would prefer to modify FreePBX’s [app-queue-toggle], or maybe the *45XXX extension, to include lines that write to the Queue Log.

I think that the best way to accomplish this would be to add the relevant lines to the [app-queue-toggle-custom] context in /etc/asterisk/extensions_custom.conf, but I was wondering if anyone else had done this, and if there is a way to force the custom lines to execute at a certain point in the process, or if they will always execute first, last, or whenever. I have considered placing a number in the custom lines (like “exten => s,5” instead of “s,n”) to force their execution at a specific point, but the hard-coded nature and potential for breaking across upgrades bothers me, and I am uncertain how to properly do it given the (deactivate), (activate), etc subroutines in app-queue-toggle.

Many thanks,


PS: I am also pursuing this on the QM side, but I’d appreciate opinions on how best this can be done from a FreePBX point of view.
PPS: I wonder if it might be a good idea for FreePBX to write the events out to the log by default, as the information can be useful for things other than QM, and I don’t think it would cause undesired behavior for those who do not need it…?

Hi Guys

I have just installed FreePBX with queuemtrics software and have the same issue as above. FreePBX does not log all the information to the asterisk queue_log file yet it has been configured to write to the log file. How do i enable this again or get it resolved as soon as possible? I suspect this is due to the fact that Q-xact feature or module is supplied with FreePBX.

Can you confirm or resolve this for me please.

No its FreePBX never had a need to have agent login logged to the queue logs from the feature codes. I suggest someone open a feature request to look at having this added. Also the queue metrics guys have a basic module in FreePBX that they could add this to already.

Thanks for the response Tony. Two problems:
We do not log the agents on as they are static members and permanently logged in so nothing gets written to the queue_log, even on start up.
Secondly, we operate outbound call queues and due to the fact that the agents arent on the queue info for the calls does not register either. Is there any simple (ish) solution i can do to get this up and running simply?

I would still like to see this functionality.