How to get an Extension (agent) with AGI and Queue PRO

Hi,

FreePBX 14.0.5.25
Asterisk 13.22.0

Queue Pro.
We need to call an AGI with a Survey.
In “Queue Plus Option” we are setting up “Caller Post Hangup Destination” with a Misc Destination that call our AGI.
It is OK.
But we need to capture the extension (agent) that answer the call.
WE are using MEMBERINTERFACE to do that, but we can´t get the extension.
In queues_additional.conf our queue have setinferfacevar=yes


$qMembro = $agi->get_variable(“MEMBERINTERFACE”);
$channel = explode(’/’,"$qMembro[data]");
$usuario = explode(’@’,$channel[1]);
$ramal = $usuario[0];
$agi->verbose("---- Extension: $ramal",1);

To test, we copy the dial plan with our queue to extensions_custom.conf
We modified this dial plan to call our same AGI, and we can get the extension using MEMBERINTERFACE.

It seems that with the “Caller Post Hangup Destination” option, the variables are cleaned before calling our AGI.

How can I solve it?

Thanks in advance.

Marcelo H.

In most (maybe all) queue configs, the channel variable QAGENT is populated with the local extension of the agent taking the queue call, and I know from previous experience it remains populated for the post hangup destination.

Hi Lorne,

You were right.
Thanks a lot for your help.

Marcelo Henrique

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.