I hope I can explain this well enough…
Our agents are stored in a relational database, with various status codes available to them, and a companion desktop application for them to manage their status. Things like “Available”, “Lunch”, “Meeting”, “Training”, etc. When a call comes in, it looks for anyone in an available state and directs the call to them, and sets their status to “Inbound Call”. No answer, we put them to away, etc etc etc you get the idea.
Here’s the issue I’m trying to solve for. Team has requested a special emergency line (literal life and death thing), so that if a call comes in on that specific number, it jumps the queues, skips all menus, and just rings EVERYONE who is online (but not already on a call). I’ve got that solved, sure, but the problem with Dial() is it doesn’t continue until the call has ended.
At the start of the call, I set all online agents to “EMERGENCY CALL” status, so that no other call will come to them. However, when someone answers, I need to put the other agents back to their original state, so that they can continue to take normal calls. How can I do this when the Dial() application doesn’t continue until the call ends, and how can I know who answered the call? Please note, the agents are dialed purely through their IP:Port, we are not using asterisk contact lists.
I can figure out most likely how to tell which agent it is as long as Asterisk tells me the IP that answered, but right now the big hangup is how do I let the other agents get back to whatever status they were in while the call is still happening?