General Overview ================ The system basically consists of two parts, a Master Control Program(MCP) that handles call routing decisions and one or more Queue Processors (QP) that does the actual call routing and processing. The Queue Processor ^^^^^^^^^^^^^^^^^^^ The QP is the system that processes and connects calls between agents and callers in one or many queues. It is basically a switch and handles all call signalling and processing. It communicates new callers and logged in agents to the MCP but it doesn't really participate in the decision process. When a call comes in to the QP it signalls the MCP that a new call has arrived and puts the call on hold awaiting information about what to do with it. When the MCP has decided the QP routes the call to the specified destination. The QP may also allow agents to log in and log out and informs the MCP about such events. Given this the QP will be the part that uses lots of processing power, and there may be many QP's in the system distributed on multiple machines. The Master Control Program ^^^^^^^^^^^^^^^^^^^^^^^^^^ The MCP handles all of the decision process but does none of the actual call switching and processing. The MCP is therefore the central "brain" of the system and because it doesn't do much it shouldn't need much processing power. The system can only have one MCP, but there will be provisions for MCP failover should the MCP break. The MCP receives information about incoming calls, dropped calls, call-progress and agent status from the QP's. The MCP maintains member information for each queue it manages and is responsible for allocating an agent to a new call when it comes in or when an agent becomes available. When an agent is selected for a call the MCP signalls the QP to route the call to that specific agent. If the routing should fail (agent got busy) the MCP is informed and can re-schedule the call. The policy used by the MCP to schedule calls is implementation defined. Functional overview of the protocol =================================== This is a simple functional overview of the proposed protocol. Protocol encoding details and actual commands are omitted and only protocol primitives and functions will be discussed. For simplicity sake this version of the protocol will not contain transactions for setting up and destroying call queues. It is assumed that all QP's and the MCP are configured with the same queue configuration and this protocol is only used for the call routing decision process. Agent events ^^^^^^^^^^^^ The protocol needs to keep track of the agents logged in to a particular queue. The QP's or a separate agent-login-processor inform the MCP about the status of the agents using the following messages that are sent from the QP to the MCP: * AGENT-LOGIN This message informs the MCP that an agent has logged in and is available to take calls. The message should contain necessary information for agent identification and call routing. The following items would be needed: Agent id - The ID of the logged in agent Agent channel - A destination channel to which calls should be routed. * AGENT-LOGOUT This message informs the MCP that the agent is no longer able to take calls. * AGENT-PAUSE If the QP can detect that an agent phone is busy it may optionally pause the agent so it is not considered for taking calls. This is not necessary but it may lower overall system load. * AGENT-RESUME Is sent when the QP determines that the agent is no longer busy. Call events ^^^^^^^^^^^ Call events are messages sent from the QP to the MCP to inform it of the status of calls on the system. * NEW-CALL The QP sends this message to inform the MCP that a new call has arrived in the queue. The message should contain the following items: queue id - The queue to which the call belongs call id - A QP-specific identificator for this call call time - A timestamp indicating when this call was received. This is used by the MCP to schedule calls. callerid - The Callerid of the call, if available. This is used by the MCP for call preference. local prio - A local preference value for this call. This is used if the QP has special knowledge of a higher / lower priority call. For example if the call entered on a specific trunk * DROPPED-CALL This message is sent to the MCP to inform it that a call has been dropped for whatever reason (user hangs up). This message is sent regardless of if the call has been routed or is still on hold. * CALL-ROUTE-BUSY This message is sent to inform the MCP that the destination it has chosen for the call cannot accept the call. The MCP must select another agent for this call or if no other are available pause for a moment and then reschedule the call. This is a soft failure, and should not be taken to mean that there is a problem with the destination. Routing decision messages ^^^^^^^^^^^^^^^^^^^^^^^^^ The routing messages are sent from the MCP to the QP to inform it of what to do with a particular call. * ROUTE-TO This message informs the QP that it should route the call to a specific channel. If the routing should fail (which should only happen if the agent phone is busy) the QP MUST send the CALL-ROUTE-BUSY message to the MCP. * DROP The QP should drop this call from the queue. The QP may divert the call to another configuration-dependant destination like voicemail.