Is there any way to run a command (AGI script, whatever else) at that moment
when the call that was in the queue is being bridged to a specific agent?
An examples of what I would want to do with this is, for example, have
Asterisk ask the caller for his 4 digit customer ID before being put in the
Queue. Once I know who the caller is being connected to (which agent) I’d
run a script that has the agent and the customer ID as parameters.
So the script needs to run only when we know who`s taking the call.
Where do I start, what function/option do I use?