I am using realtime database asterisk 18. Queue, Queue_members are stored in PostgresSQL, queue is working as expected and queue_members are receiving call from the queue correctly. I have an AGI script with PHP, I need to link my agi script to the queue to be executed once the call is offered to queue_member. I need to collect some caller, agent details in my custom database for reports.
I am not much familiar with asterisk advance features. Please guide me how and where i can link/set my script to be executed accordingly.
if set, run this gosub when connected to the queue member
; you can override this gosub by setting the gosub option on
; the queue application
;
;membergosub=gosub_context_name[,arg1[,…][,argN]]
I’ve used such a feature in the configuration file or the dial plan, but I’m not sure how to implement it using a database, so you’ll need to figure it out yourself.
I have populated the database and all required fields are there in the able. I need to know the way how to link/point my AGI script with queue to be executed while the call is connected to queue_member.
You can only do something on the PBX thread (run dialplan, AGI, or stasis (for ARI)) at the point where the agent has answered, but not yet been connected to the caller. If you want to do anything when Queue starts to ring an agent, you would need to monitor events with AMI (other event listening APIs exist, but this is the one designed for this).
I think it would help if you said what you were trying to achieve at a very high level (goal), rather than how you are attempting to achieve it. But if you have to do the latter, I think an example timeline of the events in a call and which ones you want to know about, would be helpful. I’d suggest you had about the right level of detail is list somewhere between 12 and 24 steps.
I will try to use Dialplan while transferring the call to the queue. is it possible to debug the queue flow in console/logs using AGI script? I need to know more whats happening while a call enter in a queue, what happens to it while being in the queue and while its exiting the queue.
I’ve made some improvements. I am trying using dialplan with queue, but I noticed that the AGI script is only executed when the calls are answered by agents. If the agent is ringing or doesn’t answer the call, the AGI script won’t be executed. This means that I won’t be able to collect call reports if agents don’t answer the call. Can someone please guide me on how to overcome this?.
I need my agi script to be executed when queue identify the agent in queue while attempting to route the call to agent or during agent availability identification