Stream Liner

Author Ellinor Niklasson

Last updated: February 18th, 2025 by Ellinor Niklasson


Telavox Stats Playbook
Product: Stream Liner  

Introduction

This document outlines the structure and purpose of the Statistics product “Stream Liner”.  

This product provides a JSON, which is designed to transmit real-time call data, including call statistics, interactions, queues, agents, and durations.

Data Sources

The provided JSONs represent three perspectives of the phone call.

Call overview

Consolidates an entire call journey into a single interaction, regardless of transfers, queue jumps, or multiple agents. Instead of treating each segment separately, all related call events are recorded as one entry in the JSON document, offering a complete call history.

URL: wss://statistics-webhook.telavox.se/calls

Example

Queue

Generates a separate JSON document for each queue a call passes through. If a call never enters a queue, no document is created. However, if the call moves through multiple queues, a JSON document is generated for each one.

URL: wss://statistics-webhook.telavox.se/queues

Example

Agent

Creates one JSON document for each phone call offered to an agent regardless whether the agent has answered or not the phone call. If the phone call has never been offered to the agent (for example hung up in the menu).

URL: wss://statistics-webhook.telavox.se/agents

Example

Data Presence

Some fields (such as start, end, answer, id_call, call_direction, customer_telavox, duration, active) are always present. 
Others, such as agent or queue data, are conditional and only appear if the information is relevant to that specific call. For example, if the phone call does not enter in any queue, there will be no queue objects. 

Refresh Rate

The JSON document is updated in real-time as the call progresses. While the call is ongoing, the boolean field “active” will be set to 1. Once the call ends, the remaining fields such as end date and total duration will be filled in. Updates occur during the following events:

Call starts

Call enters a queue

Agent answers

Call ends

Multiple Call Participants

During a phone call, various participants such as agents, queues, IVRs can have an infinite number of iterations. 
Since a call can involve many different agents or pass through multiple queues, storing every occurrence individually would lead to excessive data.

To manage this efficiently, the JSON structure introduces three key elements:

xxx_first: Captures the first participant of its type in the call.
xxx_last: Captures the last participant of its type.
Xxx_list:  Provides an array containing all participants, if needed.

For example, if a call involves 4  different agents at various stages, the JSON will fully document the first and last agent while listing the rest in the xxx_list array. This approach ensures that all relevant participants are recorded without unnecessary data overload.

How to connect

To connect, choose the appropriate data source URL based on your needs:

Call overview wss://statistics-webhook.telavox.se/calls

Call queue  wss//statistics-webhook.telavox.se/queues

Call agent  wss://statistics-webhook.telavox.se/agents

Get your token

Telavox webagent > Settings > My Account > Username and password > Integration Manage Token > Create new  Statistics Token 


Username and password

Integration - Manage Token

Create new Token 

Create new  Statistics Token

Example 1: Hello World 

Copy paste this code, add your url +  token, and … time to stream!

Download the “Hello world” code in here: just get data 

import asyncio
import websockets


async def connect():
    url = "the_url"
    jwt_token = "the_token"

    async with websockets.connect(url, extra_headers={"Authorization"f"Bearer {jwt_token}"}) as websocket:
        print("Connected")
        while True:
            try:
                message = await websocket.recv()
                print(f"Received message: {message}")

            except websockets.ConnectionClosed:
                print("Connection closed")
                break


async def main():
    try:
        await connect()
    except KeyboardInterrupt:
        print("WebSocket client stopped by user")


if __name__ == "__main__":
    asyncio.run(main())

Example 2: Get just my data

Downlostreamliner.py advanced code in here: receive and store in a json file

import asyncio
import websockets
import json 
TARGET_CUSTOMER_NUMBER = '0046xxxxxx'
TARGET_AGENT_FIRST_NAME = 'Nils Andersson'

async def connect():
    url = "the_url"
    jwt_token = "the_token"

    async with websockets.connect(url, extra_headers={"Authorization"f"Bearer {jwt_token}"}) as websocket:
        print("Connected")
        while True:
            try:
                message = await websocket.recv()
                data = json.loads(message)

                #Check if the phone call mach the needs 

                customer_match = data.get("customer_target", {}).get("number") == TARGET_CUSTOMER_NUMBER
                agent_match = data.get("agent_first", {}).get("name") == TARGET_AGENT_FIRST_NAME

                if customer_match or agent_match:
                    print(f"Received filtered message: {data}")
                else:
                    print("Message doesn't match filter criteria.")
            except websockets.ConnectionClosed:
                print("Connection closed")
                break
            except json.JSONDecodeError:
                print("Received non-JSON message")
async def main():
    try:
        await connect()
    except KeyboardInterrupt:
        print("WebSocket client stopped by user")

if __name__ == "__main__":
    asyncio.run(main())

 

Call Overview Json Example

{
  "id_call": "42139dbf-f0a9-43e9-9b58-9999999",
  "answered": 1,
  "internal": 1,
  "offered_and_answered": 1,
  "offered_and_not_answered": 0,
  "terminated_call_reason": "queue_leave_empty",
  "simultaneous_device_calls": 1,
  "active": 0,
  "voicemail": 1,
  "transfers": 4,
  "recorded": 0,
  "call_direction": "incoming",
  "time": {
    "start": 1699758055451,
    "end": 1699758100859
  },
  "customer_target": {
    "number": "004599999995"
  },
  "customer_telavox": {
    "id": "5555",
    "name": "telavox customer name"
  },
  "on_hooked_calls": {
    "no_wait_request": 3,
    "answer_wait_request": 5,
    "customer_no_answer": 2
  },
  "agent_list": [
    "Agent Name A",
    "Agent Name B"
  ],
  "agent_list_answer": [
    "Agent Name A"
  ],
  "agent_list_no_answer": [
    "Agent Name B"
  ],
  "queue_list": [
    "Queue Name A",
    "Queue Name B"
  ],
  "ivr_list": [
    "ivr_name1",
    "ivr_name2"
  ],
  "duration": {
    "queue": {
      "first": 10,
      "last": 10,
      "total": 20
    },
    "ring": {
      "first": 10,
      "last": 10,
      "total": 20
    },
    "talk": {
      "first": 10,
      "last": 10,
      "total": 20
    },
    "total": 45,
    "wait_time": 26,
    "before_queue": 10,
    "hold": 5
  },
  "menu_digit": {
    "dialed_number": 1,
    "destination": "My queue",
    "type": "Queue"
  },
  "ivr_first": {
    "id": 9999,
    "name": "ivr_name1",
    "phone": "004599999999",
    "timestamp": 1699758055455
  },
  "ivr_last": {
    "id": 9998,
    "name": "ivr_name2",
    "phone": "004599999998",
    "timestamp": 1699758055555
  },
  "queue_first": {
    "id": 6667,
    "name": "Queue Name A",
    "phone": "004599999997",
    "strategy": "rrmemory",
    "timestart": 1699758055916,
    "fail_reason": "queue_leave_abandon"
  },
  "queue_last": {
    "id": 6666,
    "name": "Queue Name B",
    "phone": "004599999996",
    "strategy": "rrmemory",
    "timestart": 1699758055916,
    "fail_reason": "queue_leave_abandon"
  },   
  "agent_first": {
    "id": 5555,
    "name": "Agent Name A",
    "phone": "004599999993",
    "answered": 1699758071921,
    "to_transfer": 1
  },
  "agent_last": {
    "id": 6666,
    "name": "Agent Name B",
    "phone": "004599999992",
    "answered": 1699758071921,
    "from_transfer": 1
  },
  "redirected": {
    "total": 5,
    "no_reason": 1,
    "no_answer": 1,
    "no_reachable": 1,
    "user_busy": 1,
    "unconditional": 1
  },
  "transfer_first": {
    "type": "blind",
    "answered":1  
  },
  "transfer_last": {
    "type": "blind",
    "answered":1  
  }
}

Fields

id_call

Description: The unique identifier of the phone call. This call ID remains constant throughout all queue jumps, transfers, or other events that occur during the call.
Type: String (UUID)
Example:
"id_call": “37b02743-b4e8-47b1-a5d0-3e7000f0fe55”

Answered

Description: Indicates whether the call has been answered or not from an overall perspective. This flag will not be to “1” if it's just picked by an ivr. Just for  a human. 
Type: Integer (Boolean-like: 1 for answered, 0 for not answered)
Example:
"answered": 1

Internal

Description: Indicates whether the call is between two agents and has been done without going outside the public network.  

Type: Integer (Boolean-like: 1 for internal, 0 for public)
Example:
"internal": 1

offered_and_answered

Description: The number of times the call was offered to an agent and successfully answered.
Type: Integer
Example:
"offered_and_answered": 4

offered_and_not_answered

Description: The number of times the call was offered to an agent but not answered. This is counted if the call was offered for more than 1 second.
Type: Integer
Example:
"offered_and_not_answered": 1

terminated_call_reason

Description: The reason the call ended.
Type: String
Values:

hangup / no_answer / busy / failed / redirect_no_answer / redirect_not_reachable / redirect_user_busy / toggle / queue_leave_abandon / queue_leave_digit / queue_leave_empty / queue_leave_timeout / queue_ohw_no_answer / queue_ohw_no_confirmation / queue_leave_full / redirect / answered_elsewhere / blind_transferred / at_complete / at_cancel / ivr_timeout / ivr_closed / bridged / answered_by_other_terminal / ivr_timeout / ivr_closed.
 

Example:
"terminated_call_reason": “queue_leave_empty”

simultaneous_device_calls

Description: Indicates how many devices were ringing simultaneously during the call.
Type: Integer
Example:
"simultaneous_device_calls": 1

active


Description: Indicates if the call is currently active.
Type: Integer (Boolean-like: 1 for active, 0 for not active)
Example:
"active": 0

Voicemail

Description: Indicates whether the call resulted in a personal voicemail (only phone calls, not chats etc)
Type: Integer (Boolean-like: 1 for voicemail, 0 for no voicemail)
Example:
"voicemail": 1

Transfer

Description: Indicates the number of transfers done in the phone call. Transfers can be done X number of times. The detail of the transfers call can be found in the transfer_first / transfer_last 

Type: Integer 

Example:
"trasnfers": 1

recorded

Description: Indicates if the call was recorded.
Type: Integer (Boolean-like: 1 for recorded, 0 for not recorded)
Example:
"recorded": 0

call_direction

Description: Specifies the direction of the call, whether it was incoming or outgoing.
Type: String
Values:

incoming: The call was received.

outgoing: The call was placed to a customer.

Example:
"call_direction": "incoming"

time

Description: Timestamps marking the start and end of the call, representing the absolute first and last interactions regardless of events during the call.
Fields:

start: Timestamp of the first interaction (in milliseconds).

end: Timestamp of the last interaction (in milliseconds).

Type: Object
Example:
"time": { "start": 1724407983816, "end": 1724408065261 }

customer_target

Description: The phone number of the customer involved in the call. This is the caller’s number for inbound calls, and the recipient’s number for outbound calls.
Fields:

number: Customer phone number.

Type: Object
Example:
"customer_target": { "number": "0034935475858" }

customer_telavox

Description: Information about the Telavox account associated with the call, including the account ID and name.
Fields:

id: Unique identifier for the Telavox account.

name: Name of the Telavox account.

Type: Object
Example:
"customer_telavox": { "id": "285964", "name": "Statistics Demo"}

on_hooked_calls

Description: Information about calls where the customer requested not to wait in the queue, opting for a callback instead.
Fields:

no_wait_request: The customer does not accept a callback.

answer_wait_request: The customer accepted to have a callback

customer_no_answer: The customer failed to answer the callback despite the agent called back. 

Type: Object
Example:
"on_hooked_calls": { "no_wait_request": 3, "answer_wait_request": 5, "customer_no_answer": 2 }

agent_list

Description: A list of all agents involved in the call, including both those who answered and those who did not.

⚠️if the queue strategy is “ring all”, the agent list will include all the agents where the phone rang

Type: Array of Strings
Example:
"agent_list": [ "Agent Name A", "Agent Name B" ]

agent_list_answer

Description: List of agents who answered the call.
Type: Array of Strings
Example:
"agent_list_answer": [ "Agent Name A" ]

agent_list_no_answer

Description: List of agents to whom the call was offered but who did not answer.
Type: Array of Strings
Example:
"agent_list_no_answer": [ "Agent Name B" ] 

⚠️if the queue strategy is “ring all”, the agent_list_no_answer will include all the agents that didn’t answered the phone call. 

queue_list

Description: A list of all the queues that the call passed through.
Type: Array of Strings
Example:
"queue_list": [ "Queue Name A", "Queue Name B" ]

ivr_list

Description: A list of all the IVRs (Interactive Voice Response systems) that the call passed through.
Type: Array of Strings
Example:
"ivr_list": [ "ivr_name1", "ivr_name2" ]

duration

Description: To avoid having to do all the mathematics, we provide all the total durations together so you can take the data cooked for you  

Fields

queue: Time spent in the first and last queue, and total queue time.

first: Time spent in the first queue.

last: Time spent in the last queue.

total: Total time spent in queues.

ring: Time spent ringing the first and last agent, and total ring time.

first: Time spent ringing the first agent.

last: Time spent ringing the last agent.

total: Total time spent ringing.

⚠️In case that queue_first.strategy is “ring all”, the duration of the ring will be the summary of all the rings to all agents where the call rang. 
To know the exact number of ring for one agent, you need to apply this formula: 

 ring / (offered_and_answered + offered_and_not_answered)

⚠️ In case there is a transfer, ring “last” will be the transfer ring time

talk: Time spent talking to the first and last agent, and total talk time.

first: Time spent talking to the first agent.

last: Time spent talking to the last agent.

total: Total talk time.

⚠️ In case there is a transfer, the talk “last” will be the transfer talk time

⚠️ In case there is a on hook, the talk will be the outgoing call from the agent to the customer

total: Total call duration.
wait_time: Time the customer spent waiting in total (ring + queue)
hold: Time spent on hold during the call.

Type: Object

Example:  

"duration": {
    "queue": {
      "first": 10,
      "last": 10,
      "total": 20
    },
    "ring": {
      "first": 10,
      "last": 10,
      "total": 20
    },
    "talk": {
      "first": 10,
      "last": 10,
      "total": 20
    },
    "total": 45
    "wait_time": 26,
    "hold": 5
  },

Description: Indicates what the customer has pressed in the menu and the object that has been redirected after.

Fields:

        dialed_number: The number that has been pressed by the user.

        destination: The description of the object where the phone has gone

        type: The type of the object

 

Type: Object

Example:

“menu_digit”: {

“dialed_number”: 1,

“destination”: “my queue”,

“type”: “queue”

}

 ivr_first

Description: Represents the first IVR  system the call interacted with.

Fields:

        id: The ID of the IVR.

        name: The name of the IVR.

        phone: The phone number of the IVR.

        timestamp: The timestamp in milliseconds when the interaction occurred.

 

        Type: Object

        Example:

“ivr_first”: {

“id”: 9999,

“name”: “ivr_name1”,

“phone”: “004599999999”,

“timestamp”: 1699758055455

}

ivr_last

Description: Represents the last IVR with which the call interacted.

Fields:

        id: The ID of the IVR.

        name: The name of the IVR.

        phone: The phone number of the IVR.

        timestamp: The timestamp when the interaction with the last IVR occurred.

           Type: Object

           Example:

“ivr_last”: {

“id”: 9998,

“name”: “ivr_name2”,

“phone”: “004599999998”,

“timestamp”: 1699758055555

}

queue_first

    Description: Represents the first queue the call entered.

    Fields:

        id: The ID of the queue.

        name: The name of the queue.

        phone: The phone number of the queue.

        strategy: The strategy used to assign the call.

        timestart: The timestamp in milliseconds when the call entered the queue.

        fail_reason: The reason the call left the queue (e.g., queue_leave_abandon).

    reasons values:queue_leave_digit / queue_leave_empty / queue_leave_timeout / queue_leave_abandon / queue_pick / queue_leave_full
 

Type: Object

    Example:

“queue_first”: {

“id”: 6667,

“name”: “Queue Name A”,

“phone”: “004599999997”,

“strategy”: “rrmemory”,

“timestart”: 1699758055916,

“fail_reason”: “queue_leave_abandon”

}

queue_last

    Description: Represents the last queue the call entered.

    Fields:

        id: The ID of the queue.

        name: The name of the last queue.

        phone: The phone number of the queue.

        strategy: The strategy used to assign the call (e.g., rrmemory).

        timestart: The timestamp in milliseconds when the call entered the queue.

        fail_reason: The reason the call left the queue (e.g., queue_leave_abandon).

    reasons values:queue_leave_digit / queue_leave_empty / queue_leave_timeout / queue_leave_abandon / queue_pick / queue_leave_full

    Type: Object

    Example:

“queue_last”: {

“id”: 6666,

“name”: “Queue Name B”,

“phone”: “004599999996”,

“strategy”: “rrmemory”,

“timestart”: 1699758055916,

“fail_reason”: “queue_leave_abandon”

}

agent_first

Description: Represents the first agent who handled the call.

Fields:

        id: The unique identifier of the agent.

        name: The name of the first agent involved.

        phone: The phone number of the agent.

        answered: The timestamp (in milliseconds) when the agent answered the call.

 

Type: Object

Example:

"agent_first": {

  "id": 5555,

  "name": "Agent Name A",

  "phone": "004599999993",

  "answered": 1699758071921

}

agent_last

Description: Represents the last agent who handled the call.

Fields:

        id: The unique identifier of the last agent.

        name: The name of the last agent involved.

        phone: The phone number of the agent.

        answered: The timestamp when the agent answered the call.
 

Type: Object

Example:

"agent_last": {

  "id": 6666,

  "name": "Agent Name B",

  "phone": "004599999992",

  "answered": 1699758071921,

}

redirected

Description: Provides details about how many times and for what reasons the call was redirected.

Fields:

        total: redirections that occurred during the call.

        no_reason: redirections with no specific reason provided.

        no_answer:redirections because the recipient didn’t answer.

        no_reachable: redirections because the recipient was unreachable.

        user_busy: redirections because the recipient was busy.

        unconditional: unconditional redirections .
 

Type: Object

Example:

"redirected": {

  "total": 5,

  "no_reason": 1,

  "no_answer": 1,

  "no_reachable": 1,

  "user_busy": 1,

  "unconditional": 1

}

transfer_first

Description: Provides information about the first transfer that occurred during the call.

Fields:

        type: The type of transfer (e.g., “blind”).

        answered: Indicates if the transfer was answered (1 for yes, 0 for no).

Type: Object

Example:
 

"transfer_first": {

  "type": "blind",

  "answered": 1

}

transfer_last

Description: Provides information about the last transfer that occurred during the call.

Fields:

        type: The type of transfer (e.g., “blind”).

        answered: Indicates if the transfer was answered (1 for yes, 0 for no).

Type: Object

Example:
 

"transfer_first": {

  "type": "blind",

  "answered": 1

}

Call Queue Json Example

{
  "id_call": "42139dbf-f0a9-43e9-9b58-9999999",
  "answered": 1,
  "active": 0,
  "voicemail": 1,
  "recorded": 0,
  "transfer": 1,
  "call_direction": "incoming",
  "time": {
    "start": 1697795851426,
    "end": 1697795907796
  },
  "customer_target": {
    "number": "004599999995"

  },
  "customer_telavox": {
    "id": "5555",
    "name": "telavox customer name"
  },
  "on_hooked_calls":{
    "no_wait_request": 3,
    "answer_wait_request": 5,
    "customer_no_answer": 2
  },
  "agent_list": [
    "Agent Name A",
    "Agent Name B"
  ],
  "agent_list_answer": [
    "Agent Name A"
  ],
  "agent_list_no_answer": [
    "Agent Name B"
  ],
  "agent_first": {
    "id": 5555,
    "name": "Agent Name A",
    "surname": "Grill",
    "phone": "004599999993",
    "answered": 1699758071921
  },
  "agent_last": {
    "id": 6666,
    "name": "Agent Name B",
    "surname": "Grill",
    "phone": "004599999992",
    "answered": 1699758071921
  },
  "queue": {
    "id": 6667,
    "name": "Queue Name A",
    "phone": "004599999997",
    "strategy": "rrmemory",
    "timestart": 1699758055916
  },
  "ivr": {
    "name": "description of the ivr",
    "id": 29968,
    "phone": "34986267549"
  },
  "duration": {
    "total": 50,
    "queue": 10,
    "ring": 10,
    "talk": 20,
    "hold": 10
  }
}

Fields

id_call

Description: The unique identifier of the phone call. This call ID remains constant throughout all queue jumps, transfers, or other events that occur during the call.
Type: String (UUID)
Example: “id_call”: “42139dbf-f0a9-43e9-9b58-9999999”

Answered

Description: Indicates whether the call has been answered or not from an overall perspective. This flag will not be set to “1” if it’s just picked by an IVR—only if answered by a human.

        Type: Integer (Boolean-like: 1 for answered, 0 for not answered)

         Example: “answered”: 1

Active

Description: Indicates if the call is currently active.
Type: Integer (Boolean-like: 1 for active, 0 for not active)
Example: “active”: 0

Voice mail

Description:  Indicates whether the call resulted in a personal voicemail (only phone calls, not chats, etc.).
Type: Integer (Boolean-like: 1 for voicemail, 0 for no voicemail)
Example: “voicemail”: 1

Recorded

Description:  Indicates if the call was recorded.
Type: Integer (Boolean-like: 1 for voicemail, 0 for no voicemail)
Example: “recorded”: 1

Transfer

Description:  Indicates if the call was transferred.
Type: Integer (Boolean-like: 1 for voicemail, 0 for no voicemail)
Example: “transfer”: 1

call_direction

Description: Specifies the direction of the call, whether it was incoming or outgoing.
Type: String
Values:

incoming: The call was received.

outgoing: The call was placed to a customer.

Example: "direction": "incoming"

Time

Description: Timestamps marking the start and end of the call, representing the absolute first and last interactions regardless of events during the call
Type: String
Values:

start: Timestamp of the first interaction (in milliseconds).

end: Timestamp of the last interaction (in milliseconds).

Example:
 “time”: { “start”: 1697795851426, “end”: 1697795907796 }

customer_target

Description: The phone number of the customer involved in the call. This is the caller’s number for inbound calls, and the recipient’s number for outbound calls.
Fields:

number: Customer phone number.

Type: Object
Example:
"customer_target": { "number": "0034935475858" }

customer_telavox

Description: The Information about the Telavox account associated with the call, including the account ID and name.
Fields:

id: Unique identifier for the Telavox account.

name: Name of the Telavox account.

Type: Object
Example:
“customer_telavox”: { “id”: “5555”, “name”: “telavox customer name” }

on_hooked_calls

Description: Information about calls where the customer requested not to wait in the queue, opting for a callback instead.

Fields:

no_wait_request: The customer does not accept a callback.

answer_wait_request: The customer accepted to have a callback

customer_no_answer: The customer failed to answer the callback despite the agent called back.

Type: Object
Example:
"on_hooked_calls": { "no_wait_request": 3, "answer_wait_request": 5, "customer_no_answer": 2 }

agent_list

Description: A list of all agents involved in the call, including both those who answered and those who did not..
Type: Array of Strings
Example:
“agent_list”: [ “Agent Name A”, “Agent Name B” ]

agent_list_answer

Description: List of agents who answered the call.
Type: Array of Strings
Example:
“agent_list_answer”: [ “Agent Name A” ]

agent_list_no_answer

Description: List of agents to whom the call was offered but who did not answer.
Type: Array of Strings
Example:
“agent_list_no_answer”: [ “Agent Name B” ]

agent_first

Description: Represents the first agent who handled the call
Fields

id: The unique identifier of the agent.

name: The name of the first agent involved

phone: The phone number of the agent.

answered: The timestamp (in milliseconds) when the agent answered the call.

Type: Array of Strings
Example:
“agent_first”: { “id”: 5555, “name”: “Agent Name A”, “surname”: “Grill”, “phone”: “004599999993”, “answered”: 1699758071921 }

agent_last

Description: Represents the last agent who handled the call
Fields

id: The unique identifier of the agent.

name: The name of the last agent involved

phone: The phone number of the lat agent.

answered: The timestamp (in milliseconds) when the last agent answered the call.

Type: Array of Strings
Example:
“agent_last”: { “id”: 5555, “name”: “Agent Name A”, “surname”: “Grill”, “phone”: “004599999993”, “answered”: 1699758071921 }

queue

Description: Represents the queue the call entered
Fields

id: The unique identifier of the agent.

name: The name of the last agent involved

phone: The phone number of the lat agent.

answered: The timestamp (in milliseconds) when the last agent answered the call.

Type: Array of Strings
Example:
“agent_last”: { “id”: 5555, “name”: “Agent Name A”, “surname”: “Grill”, “phone”: “004599999993”, “answered”: 1699758071921 }

ivr

Description: Represents the IVR system the call interacted with.
Fields

id: The id of the ivr

name: The name of  the IVR

phone: The phone number of the IVR.

Type: Object
    Example“ivr”: { “name”: “description of the ivr”, “id”: 29968, “phone”: “34986267549”}

duration

Description: Provides total durations for different stages of the call. 
Fields

total: Total call duration.

queue: Time spent in the queue.

ring: Time spent ringing.

talk: Time spent talking.

hold: Time spent on hold.

Type: Object
    Example:  “duration”: { “total”: 50, “queue”: 10, “ring”: 10, “talk”: 20, “hold”: 10 }

Call Agent Json Example

{
  "id_call": "42139dbf-f0a9-43e9-9b58-9999999",
  "answered": 1,
  "active": 0,
  "recorded": 0,
  "transfer": 1,
  "on_hooked_calls": 1,
  "call_direction": "incoming",
  "agent_end_reason": "agent_hangup",
  "internal": 0,
  "simultaneous_device_calls": 1,
  "time": {
    "start": 1697795851426,
    "end": 1697795907796,
    "answered": 1697795907796
  },
  "customer_target": {
    "number": "004599999995"
  },
  "customer_telavox": {
    "id": "5555",
    "name": "telavox customer name"
  },
  "agent": {
    "id": "39940",
    "name": "Joseph",
    "phone": "34986267549",
    "time_zone": "Europe/Madrid"
  },
  "duration": {
    "total": 40,
    "ring": 10,
    "talk": 20,
    "hold": 10
  },
  "ivr": {
    "name": "description of the ivr",
    "id": 29968,
    "phone": "0034986267549"
  },
  "queue": {
    "id": 6667,
    "name": "Queue Name A",
    "phone": "004599999997",
    "strategy": "rrmemory",
    "timestart": 1699758055916
  }
}

Fields

id_call

Description: The unique identifier of the phone call. This call ID remains constant throughout all queue jumps, transfers, or other events that occur during the call.
Type: String (UUID)
Example: “id_call”: “42139dbf-f0a9-43e9-9b58-9999999”

answered


Description: Indicates whether the call has been answered or not from an overall perspective. This flag will not be set to “1” if it’s just picked by an IVR—only if answered by a human.

       Type: Integer (Boolean-like: 1 for answered, 0 for not answered)

  Example: “answered”: 1

active

Description: Indicates if the call is currently active.
Type: Integer (Boolean-like: 1 for active, 0 for not active)
Example: “active”: 0

recorded

Description:  Indicates if the call was recorded.
Type: Integer (Boolean-like: 1 for recorded, 0 for not recorded)
Example: “recorded”: 1

transfer

Description:  Indicates if the call was transferred.
Type: Integer (Boolean-like: 1 for transfer, 0 for not transfered)
Example: “transfer”: 1

call_direction

Description: Specifies the direction of the call, whether it was incoming or outgoing.
Type: String
Values:

incoming: The call was received

outgoing: The call was placed to a customer.

Example: "call_direction": "incoming"

agent_end_reason

Description: why the phone call has ended. The agent hang up, the customer hang up
Type: String
Example: "agent_end_reason": "agent_hangup"

internal

Description: Indicates whether the call is between two agents and has been done without going outside the public network.  
Type: Integer (Boolean-like: 1 for internal, 0 for public)
Example:
"internal": 1

simultaneous_device_calls

Description: Indicates how many devices were ringing simultaneously during the call.
Type: Integer
Example:
"simultaneous_device_calls": 1

time

Description: Timestamps marking the start and end of the call, representing the absolute first and last interactions regardless of events during the call
Type: String
Values:

start: Timestamp of the first interaction (in milliseconds).

end: Timestamp of the last interaction (in milliseconds).

answered: Timestamp of the time the phone call was answered  (in milliseconds).

Example:
"time": { "start": 1697795851426, "end": 1697795907796, "answered": 1697795907796 },

customer_target

Description: The phone number of the customer involved in the call. This is the caller’s number for inbound calls, and the recipient’s number for outbound calls.
Fields:

number: Customer phone number.

Type: Object
Example:
"customer_target": { "number": "0034935475858" }

customer_telavox

Description: The Information about the Telavox account associated with the call, including the account ID and name.
Fields:

id: Unique identifier for the Telavox account.

name: Name of the Telavox account.

Type: Object
Example:
“customer_telavox”: { “id”: “5555”, “name”: “telavox customer name” }

Agent

Description: Basic Information about the agent who received the phone call
Fields:

id: The id of the agent

name: Name and surname

phone: Associated phone call of the agent

time_zone: The timezone where the agent is configurated

Type: Object
Example:
"agent": { "id": "39940", "name": "Joseph", "phone": "34986267549", "time_zone": "Europe/Madrid" }

on_hooked_calls

Description: Indicates if the agent is in a call that was hooked.
Type: Integer (Boolean-like: 1 for active, 0 for not active)
Example: “on_hooked_calls”: 0

queue

Description: Represents the queue the call entered
Fields

id: The unique identifier of the queue.

name: The name of the queue

phone: The phone number assigned to this queue

strategy: the way the queue offers the phone calls to the agents

Type: Array of Strings
Example:
"queue": { "id": 6667, "name": "Queue Name A", "phone": "004599999997", "strategy": "rrmemory", "timestart": 1699758055916 }

ivr

Description: Represents the IVR system the call interacted with.
Fields

id: The id of the ivr

name: The name of  the IVR

phone: The phone number of the IVR.

Type: Object
    Example“ivr”: { “name”: “description of the ivr”, “id”: 29968, “phone”: “34986267549”}

duration

Description: Provides total durations for different stages of the call.
Fields

total: Total call duration.

ring: Time spent ringing.

talk: Time spent talking.

hold: Time spent on hold.

Type: Object
    Example:  “duration”: { “total”: 50, “ring”: 10, “talk”: 20, “hold”: 10 }