Example Message Flow for a Queued and Answered Call

In this example message flow, Unified CCX is connected to the Cisco Unified Communications Manager. Unified CCX is configured with two agents: one agent is associated with extension 2005 and the other agent is associated with extension 2006.

The agent on extension 2005 is acting as a caller. One client program is connected for the agent on extension 2005. Another client program is connected for the agent 2006.

One client program is connected as a bridge mode client. The agent with extension 2006 is associated with a CSQ. The CSQ is associated with the trigger 7000.

The call flow starts when the agent on extension 2005 makes a call to the 7000 trigger. Calls are processed using the system icd.aef script.

Note
For each of the tables in this section, the value in the Caller 2005 column is Yes if extension 2005 is a logged in agent, No if extension 2005 is not a logged in agent.
  1. The caller on extension 2005 makes the call to trigger 7000.

    Server sends the following message(s) Message(s) received by Notes
    Bridge mode clients Agent mode 2006 Caller 2005
    MsgType: BEGIN_CALL_EVENT
      NumCTIClients: 0
      NumNamedVars: 0
      NumNamedArrays: 0
      CallType: 9
      ConnectionDeviceType: 0
      CallID: 16777507
      CalledPartyDisposition: 0
      ConnectionDeviceID: 2005
      ANI1: 2005
    ...
    Yes No Yes

    This message indicates the beginning of the call. Notice that the CallID is 16777507.

    MsgType: CALL_SERVICE_INITIATED_EVENT
      ConnectionDeviceType: 0
      CallID: 16777507
      ApplicationID: -1
      CSQID: -1
      CallingDeviceType: 76
      LocalConnectionState: 1
      EventCause: 65535
      ConnectionDeviceID: 2005
      CallingDeviceID: 2005
    Yes No Yes This message indicates the device 2005 is off-hook. This message is generated only if device 2005 is monitored.
    MsgType: CALL_ORIGINATED_EVENT
      ConnectionDeviceType: 0
      CallID: 16777507
      ApplicationID: -1
      CSQID: -1
      CallingDeviceType: 76
      CalledDeviceType: 74
      LocalConnectionState: 1
      EventCause: 65535
      ConnectionDeviceID: 2005
      CallingDeviceID: 2005
      CalledDeviceID: 7000
    Yes No Yes This message indicates the call has dialed a number 7000. Notice that the CalledDeviceID is 7000. This message is only generated if device 2005 is monitored.
    MsgType: CALL_DELIVERED_EVENT
      ConnectionDeviceType: 0
      CallID: 16777507
      ApplicationID: 2
      CSQID: -1
      AlertingDeviceType: 73
      CallingDeviceType: 76
      CalledDeviceType: 73
      LastRedirectedDeviceType: 65535
      LocalConnectionState: 2
      EventCause: 22
      NumNamedVars: 0
      NumNamedArrays: 0
      ConnectionDeviceID: 9019
      AlertingDeviceID: 9019
      CallingDeviceID: 2005
      CalledDeviceID: 9019
      LastRedirectedDeviceID:
      SecondaryCallID: 0
      ANI: 2005
      DNIS: 7000
      DialedNumber: 7000
    ...
    Yes No Yes

    The Unified CCX trigger is alerted.

    The call from device 2005 is delivered to CTI port 9019 in a Call Control Group.

    If the ANI is empty use the CallingDeviceID instead of ANI.

    MsgType: CALL_ESTABLISHED_EVENT
      ConnectionDeviceType: 0
      CallID: 16777507
      ApplicationID: 2
      CSQID: -1
      AnsweringDeviceType: 73
      CallingDeviceType: 76
      CalledDeviceType: 73
      LastRedirectedDeviceType: 65535
      LocalConnectionState: 3
      EventCause: 22
      ConnectionDeviceID: 9019
      AnsweringDeviceID: 9019
      CallingDeviceID: 2005
      CalledDeviceID: 9019
      LastRedirectedDeviceID:
    Yes No Yes

    The Unified CCX trigger accepts the call.

    CTI port 9019 accepts the call. This is the result of the Accept step in the icd.aef script.

    1
  2. The call is queued.

    Server sends the following message(s) Message(s) received by Notes
    Bridge mode clients Agent mode 2006 Caller 2005
    MsgType: CALL_QUEUED_EVENT
      ConnectionDeviceType: 0
      CallID: 16777507
      ApplicationID: 2
      QueueDeviceType: 77
      CallingDeviceType: 76
      CalledDeviceType: 74
      LastRedirectedDeviceType: 65535
      NumCSQs: 1
      LocalConnectionState: 5
      EventCause: 65535
      ConnectionDeviceID: 9019
      QueueDeviceID: 1
      CallingDeviceID: 2005
      CalledDeviceID: 7000
      LastRedirectedDeviceID:
      CsqID[0]: 1
    Yes No Yes This message indicates that the call is queued in a CSQ with the ID 1.
  3. The agent becomes Ready.

    Server sends the following message(s) Message(s) received by Notes
    Bridge mode clients Agent mode 2006 Caller 2005
    MsgType: AGENT_STATE_EVENT
      CSQState: 3
      StateDuration: 0
      CSQID: -1
      AgentState: 3
      EventReasonCode: 0
      NumCSQs: 0
      AgentExtension: 2006
      AgentID: agt2006
      NextAgentState: 65535
    Yes No Yes The agent on extension 2006 changes state to Ready. Notice that the AgentState is 3.
  4. Agent is reserved.

    Server sends the following message(s) Message(s) received by Notes
    Bridge mode clients Agent mode 2006 Caller 2005
    MsgType: AGENT_STATE_EVENT
      CSQState: 3
      StateDuration: 0
      CSQID: -1
      AgentState: 3
      EventReasonCode: 0
      NumCSQs: 0
      AgentExtension: 2006
      AgentID: agt2006
      NextAgentState: 65535
    Yes Yes Yes The CSQ identifies the agent on extension 2006 and reserves that agent.
  5. The agent phone on extension 2006 rings.

    Server sends the following message(s) Message(s) received by Notes
    Bridge mode clients Agent mode 2006 Caller 2005
    MsgType: CALL_DELIVERED_EVENT
      ConnectionDeviceType: 0
      CallID: 16777507
      ApplicationID: 2
      CSQID: 1
      AlertingDeviceType: 76
      CallingDeviceType: 76
      CalledDeviceType: 76
      LastRedirectedDeviceType: 65535
      LocalConnectionState: 2
      EventCause: 22
      NumNamedVars: 0
      NumNamedArrays: 0
      ConnectionDeviceID: 2006
      AlertingDeviceID: 2006
      CallingDeviceID: 2005
      CalledDeviceID: 2006
      LastRedirectedDeviceID:
      SecondaryCallID: 16777508
    ...
    Yes Yes Yes The call is delivered to the agent device (Extension) 2006.
  6. The agent at extension 2006 answers the call.

    Server sends the following message(s) Message(s) received by Notes
    Bridge mode clients Agent mode 2006 Caller 2005
    MsgType: AGENT_STATE_EVENT
      CSQState: 4
      StateDuration: 0
      CSQID: -1
      AgentState: 4
      EventReasonCode: 0
      NumCSQs: 0
      AgentExtension: 2006
      AgentID: agt2006
      NextAgentState: 3
    Yes Yes Yes When the agent on extension 2006 answers the call, the agent state is changed to Talking.
    MsgType: CALL_DATA_UPDATE_EVENT
      NumCTIClients: 0
      NumNamedVars: 0
      NumNamedArrays: 0
      CallType: 10
      ConnectionDeviceType: 0
      CallID: 16777507
      CalledPartyDisposition: 0
      ConnectionDeviceID: 2005
    ...
    Yes Yes Yes Call data is sent to client programs.
    MsgType: CALL_ESTABLISHED_EVENT
      ConnectionDeviceType: 0
      CallID: 16777507
      ApplicationID: -1
      CSQID: 1
      AnsweringDeviceType: 76
      CallingDeviceType: 76
      CalledDeviceType: 76
      LastRedirectedDeviceType: 73
      LocalConnectionState: 3
      EventCause: 22
      ConnectionDeviceID: 2006
      AnsweringDeviceID: 2006
      CallingDeviceID: 2005
      CalledDeviceID: 2006
      LastRedirectedDeviceID: 9019
    Yes Yes Yes When the agent on extension 2006 answers the call, the call is connected.
    MsgType: CallDequeuedEvent
      ConnectionDeviceType: 65535
      CallID: 16777507
      ApplicationID: -1
      QueueDeviceType: 0
      NumQueued: 0
      NumCSQs: 0
      LocalConnectionState: 3
      EventCause: 65535
      ConnectionDeviceID:
      QueueDeviceID:
    Yes Yes Yes Unified CCX removes the call from the CSQ.
  7. The call is disconnected from the CTI port.

    Server sends the following message(s) Message(s) received by Notes
    Bridge mode clients Agent mode 2006 Caller 2005
    MsgType: CALL_CONNECTION_CLEARED_EVENT
      ConnectionDeviceType: 0
      CallID: 16777507
      ReleasingingDeviceType: 73
      LocalConnectionState: 65535
      EventCause: 28
      ConnectionDeviceID: 9019
      ReleasingDeviceID: 9019
    Yes Yes Yes The call is disconnected from CTI port 9019.
  8. The caller on extension 2005 hangs up.

    Server sends the following message(s) Message(s) received by Notes
    Bridge mode clients Agent mode 2006 Caller 2005
    MsgType: CALL_CONNECTION_CLEARED_EVENT  ConnectionDeviceType: 0
      CallID: 16777507
      ReleasingingDeviceType: 76
      LocalConnectionState: 65535
      EventCause: 65535
      ConnectionDeviceID: 2005
      ReleasingDeviceID: 2005
    Yes Yes Yes The call is disconnected from the caller on extension 2005.
    MsgType: AGENT_STATE_EVENT
      CSQState: 3
      StateDuration: 0
      CSQID: -1
      AgentState: 3
      EventReasonCode: 0
      NumCSQs: 0
      AgentExtension: 2006
      AgentID: agt2006
      NextAgentState: 65535
    Yes Yes Yes The state of Agent 2006 is changed back to Ready since the agent has the Automatic Available checkbox enabled.
    MsgType: CALL_CONNECTION_CLEARED_EVENT
      ConnectionDeviceType: 0
      CallID: 16777507
      ReleasingingDeviceType: 76
      LocalConnectionState: 65535
      EventCause: 65535
      ConnectionDeviceID: 2006
      ReleasingDeviceID: 2006
    Yes Yes Yes The call is disconnected from device 2006.
    MsgType: CALL_CLEARED_EVENT
      ConnectionDeviceType: 0
      CallID: 16777507
      LocalConnectionState: 0
      EventCause: 1014
      ConnectionDeviceID: 2005
    Yes Yes Yes Since there are no more connections in the call, the call is deleted.
    MsgType: END_CALL_EVENT
      ConnectionDeviceType: 0
      ConnectionCallID: 16777507
      ConnectionDeviceID:
    Yes Yes Yes This message indicates the call is terminated.