Recipient Events

Recipient events can be used to track the state and actions that affect a recipient in Qubicle. The following are the currently emitted events.

Login

The login event is emitted when a recipient logs into Qubicle via any means.

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"create",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "account_id": "{ACCOUNT_ID}",
        "app_name": "qubicle",
        "app_version": "{VERSION}",
        "event_category": "qubicle-recipient",
        "event_name": "create",
        "event_timestamp": {SERVER_TIMESTAMP},
        "msg_id": "{MSG_ID}",
        "pid": "{PROCESS_PID}",
        "recipient_id": "{USER_ID}",
        "state": "away",
        "username": "{USERNAME}",
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

Logout

The logout event is emitted when a recipient logs out of Qubicle via any means.

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"delete",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "account_id": "{ACCOUNT_ID}",
        "app_name": "qubicle",
        "app_version": "{VERSION}",
        "event_category": "qubicle-recipient",
        "event_name": "delete",
        "event_timestamp": {SERVER_TIMESTAMP},
        "msg_id": "{MSG_ID}",
        "reason": "{REASON}",
        "recipient_id": "{USER_ID}",
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

Ready

The ready event indicates that a recipient is now is the ‘ready’ state, and thus can receive sessions from a queue.

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"ready",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "account_id": "{ACCOUNT_ID}",
        "app_name": "qubicle",
        "app_version": "{VERSION}",
        "away_time": {TIME_RECIPIENT_WAS_AWAY_IN_SECONDS}
        "event_category": "qubicle-recipient",
        "event_name": "ready",
        "event_timestamp": {SERVER_TIMESTAMP},
        "msg_id": "{MSG_ID}",
        "recipient_id": "{USER_ID}",
        "state": "ready",
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

Away

The away event indicates that a recipient is in the ‘away’ state and thus will not be considered for session delivery from a queue.

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"away",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "account_id": "{ACCOUNT_ID}",
        "app_name": "qubicle",
        "app_version": "{VERSION}",
        "event_category": "qubicle-recipient",
        "event_name": "away",
        "event_timestamp": {SERVER_TIMESTAMP},
        "msg_id": "{MSG_ID}",
        "state": "away",
        "recipient_id": "{USER_ID}",
        "reason": "{REASON}",
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

Pause

The pause event indicates that a recipient has paused call delivery from a given queue.

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"pause",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "account_id": "{ACCOUNT_ID}",
        "app_name": "qubicle",
        "app_version": "{VERSION}",
        "event_category": "qubicle-recipient",
        "event_name": "pause",
        "event_timestamp": {SERVER_TIMESTAMP},
        "msg_id": "{MSG_ID}",
        "recipient_id": "{USER_ID}",
        "queue_id": "{QUEUE_ID}",
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

Resume

The resume event indicates that a recipient has resumed call delivery from a given queue.

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"resume",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "account_id": "{ACCOUNT_ID}",
        "app_name": "qubicle",
        "app_version": "{VERSION}",
        "event_category": "qubicle-recipient",
        "event_name": "resume",
        "event_timestamp": {SERVER_TIMESTAMP},
        "msg_id": "{MSG_ID}",
        "recipient_id": "{USER_ID}",
        "queue_id": "{QUEUE_ID}",
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

Wrapup Start

The wrapup start event indicates the start of wrap-up time. Which is a configurable (per-queue) amount of time after handling a session that the recipient will not be offered additional sessions.

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"wrapup_start",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "account_id": "{ACCOUNT_ID}",
        "app_name": "qubicle",
        "app_version": "{VERSION}",
        "event_category": "qubicle-recipient",
        "event_name": "wrapup-start",
        "event_timestamp": {SERVER_TIMESTAMP},
        "msg_id": "{MSG_ID}",
        "state": {STATE},
        "recipient_id": "{USER_ID}",
        "queue_id": "{QUEUE_ID}",
        "wrapup_time_seconds": {TIME_IN_SECONDS_OF_WRAPUP},
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

Wrapup Complete

The wrapup complete event indicates the end of wrap-up time.

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"wrapup_complete",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "account_id": "{ACCOUNT_ID}",
        "app_name": "qubicle",
        "app_version": "{VERSION}",
        "available": {BOOLEAN IF AVAILABLE},
        "availability_state": "{STRING_AVAIL_STATE}",
        "event_category": "qubicle-recipient",
        "event_name": "wrapup-complete",
        "event_timestamp": {SERVER_TIMESTAMP},
        "msg_id": "{MSG_ID}",
        "state": {STATE},
        "recipient_id": "{USER_ID}",
        "queue_id": "{QUEUE_ID}",
        "total_time": {TOTAL_WRAPUP_TIME},
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

Offer

The offer event indicates that a session is being offered to the recipient from a queue.

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"offer",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "account_id": "{ACCOUNT_ID}",
        "app_name": "qubicle",
        "app_version": "{VERSION}",
        "caller_id_name": "{CALLER_ID_NAME}",
        "caller_id_num": "{CALLER_ID_NUM}",
        "enter_pos": {QUEUE_ENTER_POSITION},
        "queue_enter_time": {QUEUE_ENTER_TIME},
        "est_wait": {QUEUE_ESTIMATED_WAIT},
        "force_away_on_reject": {FORCE_AWAY_FLAG},
        "event_category": "qubicle-recipient",
        "event_name": "offer",
        "event_timestamp": {SERVER_TIMESTAMP},
        "msg_id": "{MSG_ID}",
        "queue_id": "{QUEUE_ID}",
        "queue_wrapup": {QUEUE_WRAPUP_TIME},
        "recipient_id": "{USER_ID}",
        "ring_timeout": {RING_TIMEOUT},
        "session_id": "{SESSION_ID}",
        "session_zone": "{SESSION_ZONE}",
        "caller_id_name": {CALLER_ID_NAME},
        "caller_id_number": {CALLER_ID_NUMBER},
        "queue_enter_time": {QUEUE_ENTER_TIME},
        "state": "{STATE}",
        "offer_data": {PRIV_OFFER_DATA},
        "session": {SESSION_CALL_OBJECT},
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

Reject

The reject event indicates that a recipient has rejected a call.

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"reject",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "recipient_id":"{RECIPIENT_ID}",
        "account_id":"{ACCOUNT_ID}",
        "msg_id":"{MSG_ID}",
        "event_name":"reject",
        "event_category":"qubicle-recipient",
        "event_timestamp": {SERVER_TIMESTAMP},
        "app_version": "{VERSION}",
        "app_name":"qubicle",
        "queue_id": "{QUEUE_ID}",
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

Rescind

The rescind event indicates that an offer has been rescinded from the recipient. This could happen for example if a session hung-up while it was being offered.

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"rescind",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "state":"{STATE}",
        "session_id":"{SESSION_ID}",
        "recipient_id":"{RECIPIENT_ID}",
        "queue_id": "{QUEUE_ID}",
        "account_id":"{ACCOUNT_ID}",
        "msg_id":"{MSG_ID}",
        "event_name":"rescind",
        "event_category":"qubicle-recipient",
        "event_timestamp": {SERVER_TIMESTAMP},
        "app_version":"{VERSION}",
        "app_name":"qubicle",
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

Delivered

The delivered event indicates that a session was successfully delivered to a recipient and is now being handled.

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"delivered",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "account_id": "{ACCOUNT_ID}",
        "app_name": "qubicle",
        "app_version": "{VERSION}",
        "event_category": "qubicle-recipient",
        "event_name": "delivered",
        "event_timestamp": {SERVER_TIMESTAMP},
        "msg_id": "{MSG_ID}",
        "recipient_id": "{RECIPIENT_ID}",
        "queue_id": "{QUEUE_ID}",
        "queue_name": "{QUEUE_NAME}",
        "session_id": "{SESSION_ID}",
        "caller_id_name": {CALLER_ID_NAME},
        "caller_id_number": {CALLER_ID_NUMBER},
        "queue_enter_time": {QUEUE_ENTER_TIME},
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

Hangup

The hangup event indicates that a session has been hung-up after being handled by the recipient.

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"hangup",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "queue_id":"{QUEUE_ID}",
        "session_id":"{SESSION_ID}",
        "recipient_id":"{RECIPIENT_ID}",
        "account_id":"{ACCOUNT_ID}",
        "msg_id":"{MSG_ID}",
        "event_name":"hangup",
        "event_category":"qubicle-recipient",
        "app_version":"{VERSION}",
        "app_name":"qubicle",
        "talk_time": {TALK_TIME},
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

External Call Start

The external call start message indicates that a recipient has gone on a non-queue call.

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"external_call_start",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "recipient_id":"{RECIPIENT_ID}",
        "account_id":"{ACCOUNT_ID}",
        "msg_id":"{MSG_ID}",
        "event_name":"external_call_start",
        "event_category":"qubicle-recipient",
        "event_timestamp": {SERVER_TIMESTAMP},
        "app_version":"{VERSION}",
        "app_name":"qubicle",
        "external_call_id": "{CALL_ID}",
        "state": "{STATE}",
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

External Call End

The external call end event indicates that a recipient is no longer on a non-queue call.

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"external_call_end",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "recipient_id":"{RECIPIENT_ID}",
        "account_id":"{ACCOUNT_ID}",
        "msg_id":"{MSG_ID}",
        "event_name":"external_call_end",
        "event_category":"qubicle-recipient",
        "event_timestamp": {SERVER_TIMESTAMP},
        "app_version":"{VERSION}",
        "app_name":"qubicle",
        "state": "{STATE}",
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

Sync

The sync event is used to periodically propagate the state of a recipient so that clients can ensure that they have the most up-to-date state information. This event is used for internal purposes, and as such may change at any time.

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"sync",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "recipient_id":"{RECIPIENT_ID}",
        "account_id":"{ACCOUNT_ID}",
        "msg_id":"{MSG_ID}",
        "event_name":"sync",
        "event_category":"qubicle-recipient",
        "event_timestamp": {SERVER_TIMESTAMP},
        "availability_state": "{AVAILABILITY_STATE}",
        "available": {AVAILABLE_FLAG},
        "node": "{ORIGINATING_NODE}",
        "wrapup_time_seconds": {SECONDS_OF_WRAPUP},
        "app_version":"{VERSION}",
        "app_name":"qubicle",
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

Wiretap Start

The wiretap start event indicates that the recipient is wiretapping / monitoring another recipient, or is being monitored

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"wiretap_start",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "monitoring-recipient-id": "{MONITORING_RECIPIENT_ID}",
        "target": "{TARGET_RECIPIENT_ID}",
        "mode:" "{WIRETAP_MODE}",
        "wiretap-call-id": "{WIRETAP_CALL_ID}",
        "recipient_id":"{RECIPIENT_ID}",
        "account_id":"{ACCOUNT_ID}",
        "msg_id":"{MSG_ID}",
        "event_name":"wiretap_start",
        "event_category":"qubicle-recipient",
        "app_version":"{VERSION}",
        "app_name":"qubicle",
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

Wiretap Stop

The wiretap stop event indicates that the recipient is no longer monitoring or being monitored

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"wiretap_stop",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "wiretap-call-id": "{WIRETAP_CALL_ID}",
        "recipient_id":"{RECIPIENT_ID}",
        "account_id":"{ACCOUNT_ID}",
        "msg_id":"{MSG_ID}",
        "event_name":"wiretap_stop",
        "event_timestamp": {SERVER_TIMESTAMP},
        "event_category":"qubicle-recipient",
        "app_version":"{VERSION}",
        "app_name":"qubicle",
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

Wiretap Failed

The wiretap failed event indicates that an attempted monitor action has failed for some reason

{
    "action":"event",
    "subscribed_key":"qubicle.recipient",
    "subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
    "name":"wiretap_failed",
    "routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
    "data":{
        "recipient_id":"{RECIPIENT_ID}",
        "account_id":"{ACCOUNT_ID}",
        "msg_id":"{MSG_ID}",
        "event_name":"wiretap_failed",
        "event_category":"qubicle-recipient",
        "event_timestamp": {SERVER_TIMESTAMP},
        "app_version":"{VERSION}",
        "app_name":"qubicle",
        "stats": {
            "total_calls": {TOTAL_CALLS},
            "offered_calls": {OFFERED_CALLS},
            "missed_calls": {MISSED_CALLS},
            "avg_call_time": {AVG_CALL_TIME},
            "login_time": {LOGIN_TIME},
            "last_action_time": {LAST_ACTION_TIME},
            "last_handled_time": {LAST_HANDLED_TIME}
        }
    }
}

On this Page