AGI script on queue answer

This seems quite straight forward, but the challenge is on the version I’m running!

I’m running v2.6.2.2 (Trixbox)
Asterisk: 1.4.22-3

And what I’d like to do is trigger an AGI when an agent picks up a call in the queue. Looking at asterisk I can do this with the AGI param on the queue command:


And is supported in the version of Asterisk I’ve got. But my version of freepbx doesn’t have that added field in the webui unfortunately. I suspect I’ll not get approval to upgrade, so I’m looking at alternatives at least in the short term.

Checking in extensions_additional.conf I see the relevant call for the queue in question and the queue command:
exten => 226,n,Queue(226,t,300)

But obviously if I change this file extensions_additional.conf it will be overwritten.
I have a large number of queues, so I suspect using an override isn’t practical here as I’d have to override the entire [ext-queues] section (correct?) Or could I just override the part for my queue 226? (Copying the part from extensions_additional.conf into extensions_override_freepbx.conf and making changes needed?)

Or is there a better way to do what I’m after (Which is basically, when an agent answers a call, it automatically calls a script to generate a ticket/log on our separate ticket system).
I’m after it creating the ticket almost in realtime, so using the cdr/parsing queue_log isn’t an option unfortunately.

Thanks in advance folks.

You will need to upgrade to a modern FreePBX

Sorry, just to reply to my own thread immediately, I’ve also tried:

Adding into extensions_custom.conf

exten => _X.,1,NoOp(Custom queue code)
exten => _X.,2,DeadAgi(ticket_trigger.php|${CALLERID(number)}|${CHANNEL}|${MEMBERINTERFACE}|${BRIDGEDPEER})

But I suspect as this triggers before the queue, it therefore won’t know who actually answers the queue, it just gets who it tries to ring in the queue?