Telavox Stream Liner

Author Ellinor Niklasson

Last updated: 08.10.2025 by Ellinor Niklasson

Introducing the Telavox Stream Liner. Discover more by clicking the tabs below: Stream Liner - Live and Stream Liner - Historic.

Stream Liner - Live

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 }

Delete

Stream Liner - Historic

Introduction

In addition to the real-time data provided by the WebSocket endpoints, Streamliner also offers an on-demand data retrieval option through GraphQL. This allows you to request historical or aggregated call data, agent activity, and queue information when needed, rather than only receiving real-time events.

Overview

Base URLhttps://statistics-api.telavox.se
Endpoint: POST /graphql
Authentication: Authentication: Bearer <TVX App Token> 
Content-Type: application/json
Time: All timestamps are ISO 8601 in UTC (e.g., 2025-10-01T10:15:21Z).
Durations: All duration values are expressed in seconds unless stated otherwise.

Postman

Would you like to use Postman for testing? You can grab the collection here : link

Schema Definition Language

The Schema Definition Language (SDL) describes the complete structure of a GraphQL API.
It defines what data sources are available, the types of data each operation returns, and which fields you can request when building queries.

Data Sources  

These are the main entry points of the API. Each data source represents a logical view of the system and can be queried directly:

⚠️The datasources name should change to be the same as in streamliner real time. Now are working with this temporary

  • callOverview:  Provides a complete view of the entire call journey, including agents, queues, IVRs, durations, and call outcomes.

  • agentOverview:  Offers agent-focused call and activity information, such as handling times, directions, and call states.

  • queueOverview: Delivers queue-level call data, including waiting times, strategies, and performance metrics.

Input Types (Filters & Arguments)

Input types define how you can refine and limit query results. They let you constrain time ranges and control pagination so large datasets can be processed safely and efficiently.

OverviewFilter

Description: Filters records by time window.

Fields
  • startDate: ISO 8601 date-time string (UTC). Example: 2025-10-01T00:00:00Z

  • endDate: ISO 8601 date-time string (UTC). Example: 2025-10-02T23:59:59Z

Both fields are optional, but using them together is recommended to bound queries.
Results include records whose timestamps fall within the inclusive start and exclusive end window unless otherwise specified by the API.

Pagination 

Parameters 

These arguments are applied directly on the root queries (callOverview, agentOverview, queueOverview):

  • first (Int): Number of records to return in one page (page size; subject to service limits)

  • after (String): Cursor token returned by the previous page; use it to continue fetching the next page.

Pagination Behavior

Responses include cursor and hasNextPage.
Continue paginating while hasNextPage is true, passing the last returned cursor as after.
If hasNextPage is false, you have reached the end of the result set.

Best Practices

Always prefer bounded queries (provide startDate and endDate).
Choose a reasonable first value to keep responses manageable.

Retry with the same after cursor if a transient error occurs; if the cursor expires, restart from the last successful cursor or re-run the query for the same window.

All timestamps are ISO 8601 in UTC; all duration values are expressed in seconds unless otherwise noted.

Returned Data

Each data source returns a connection object that wraps the records and provides pagination details:

  • data: The actual list of records (e.g., CallOverviewRecord, AgentOverviewRecord).

  • totalCount: Total number of records matching your request.

  • cursor and hasNextPage: Indicators for navigating through paginated results.

Errors & Responses

GraphQL validation errors are returned in the errors array.
Authentication and authorization failures return HTTP 401/403.
Invalid fields or unknown arguments cause GraphQL schema validation errors.

Query Examples

Minimal Query (Basic Example)

Query with Date Filter

Query with Pagination

Full Record Query (All Fields)

Selective Query (Requesting Specific Fields Only)

Combining Filters and Pagination

Performance Tip: Request Only Needed Fields

Types & Fields Reference

CallOverview 
AgentOverview 
Queue Overview 
Common Nested Types


Query Examples

Minimal Query

Download example for macos/linux

Download example for windows

Use this query as the simplest possible request to the API.

It demonstrates how to fetch only a few key fields (such as idCall and answered) without applying filters or pagination.

This is the best starting point to verify connectivity and understand the basic structure of the GraphQL response before building more complex queries.

query {
  agentOverview {
    data {
      idCall
      answered
    }
  }
}

Query with Date Filter

Download example for macos/linux

Download example for windows


Use this query to retrieve records within a specific time range.

The startDate and endDate parameters accept ISO 8601 date-time strings and allow you to limit the dataset to the desired period.

This approach is recommended when you need to analyze historical data or generate reports for a defined date range instead of retrieving all available records.

query {
  callOverview(
    filter: { startDate: "2025-10-01T00:00:00Z", endDate: "2025-10-02T23:59:59Z" }
  ) {
    data {
      idCall
      callDirection
      answered
      duration { total talk ring }
    }
    totalCount
    hasNextPage
    cursor
  }
}

Query with Pagination

Download example for macos/linux

Download example for windows


Use this query when the result set can be large and you need to process it in smaller chunks.

The first parameter defines how many records to retrieve per page, while the after parameter uses the cursor returned by the previous page to continue fetching data.

This approach prevents timeouts, keeps responses manageable, and is recommended for integrations that need to handle large historical datasets.

query {
  callOverview(
    filter: { startDate: "2025-10-01T00:00:00Z", endDate: "2025-10-02T23:59:59Z" }
    first: 50
    after: "cursorTokenExample123"
  ) {
    data {
      idCall
      callDirection
      answered
      agentFirst { name phone }
    }
    totalCount
    cursor
    hasNextPage
  }
}

Full Record Query (All Fields) 

Download example for macos/linux

Download example for windows


Use this query when you want to retrieve the complete call object with every available field.

It is ideal for exploring the full schema, validating your integration, or exporting all call data for analysis.

Since it returns the maximum amount of information, it is more resource-intensive and should only be used when you really need the full payload.

query {
  callOverview(
    filter: { startDate: "2025-10-01T00:00:00Z", endDate: "2025-10-02T23:59:59Z" }
    first: 100
  ) {
    data {
      idCall
      callDirection
      answered
      active
      customerTarget { number }
      agentFirst { id name phone answered email fromTransfer toTransfer licence { type ccpro } }
      agentLast { id name phone answered email fromTransfer toTransfer licence { type ccpro } }
      agentList
      agentListAnswer
      agentListNoAnswer
      queueFirst { id name phone strategy timestart failReason }
      queueLast { id name phone strategy timestart failReason }
      queueList
      ivrFirst { id name phone timestamp }
      ivrLast { id name phone timestamp }
      ivrList
      duration {
        total
        talk { first last total }
        ring { first last total }
        queue { first last total }
        wait
        hold
        onHold
      }
      transfers
      transferFirst { type answered }
      transferLast { type answered }
      redirected {
        total
        noReason
        noAnswer
        notReachable
        userBusy
        unconditional
      }
      terminatedCallReason
      menuDigit { dialedNumber destination type }
      time { start end }
      simultaneousDeviceCalls
      inactiveNumber
      recorded
      internal
    }
    totalCount
    cursor
    hasNextPage
  }
}

Selective Query (Requesting Specific Fields Only)

Download example for macos/linux

Download example for windows


Use this query when you only need a small subset of fields instead of the full record.

By requesting only the specific data required (in this example idCall and the wait duration), the response payload becomes lighter and the request is faster.

This approach is recommended for dashboards or reports that do not need the full call structure.

query {
  queueOverview(
    filter: { startDate: "2025-10-01T00:00:00Z", endDate: "2025-10-02T23:59:59Z" }
  ) {
    data {
      idCall
      duration { wait }
    }
    totalCount
  }
}

Combining Filters and Pagination

Download example for macos/linux

Download example for windows


This is useful when you need to download a large historical dataset step by step without overloading the response.

Filter: limits the results to a specific date range.
First: Requests the first 50 records in the page.
After: Continues from the cursor returned in the previous page “"cursorTokenExample123" 

query {
  callOverview(
    filter: { startDate: "2025-10-01T00:00:00Z", endDate: "2025-10-10T23:59:59Z" }
    first: 50
    after: "cursorTokenExample123"
  ) {
    data {
      idCall
      callDirection
      answered
      agentFirst { name phone }
      duration { total talk ring }
    }
    totalCount
    cursor
    hasNextPage
  }
}

Performance Tip: Request Only Needed Fields

Download example for macos/linux

Download example for windows


This query shows how to optimize performance and reduce payload size by requesting only the fields you really need.

Instead of fetching the entire record, you ask for a minimal subset (here just idCall, answered, and duration.total).

This improves speed, reduces bandwidth, and makes your integration lighter when you don’t need the full call object.

query {
  callOverview(
    filter: { startDate: "2025-10-01T00:00:00Z", endDate: "2025-10-02T23:59:59Z" }
  ) {
    data {
      idCall
      answered
      duration { total }
    }
    totalCount
  }
}

Call overview

idCall

  • Description: Unique identifier of the call (stable across transfers, queue jumps, etc.).

  • Type: String (UUID)

  • Example: "42139dbf-f0a9-43e9-9b58-9999999"

customerTarget

  • Description: Target customer information.

  • Type: CustomerTarget

  • Fields:

    • number (String)

  • Example: { number: "0034935475858" }

callDirection

  • Description: Direction of the call.

  • Type: String (values: "incoming", "outgoing")

  • Example: "incoming"

offeredAndAnswered

  • Description: Count of offers to agents that were answered.

  • Type: Int

  • Example: 4

offeredAndNotAnswered

  • Description: Count of offers to agents that were not answered (only counted if offered > 1s).

  • Type: Int

  • Example: 1

onHookedCalls

  • Description: Callback/"on hook" outcomes for the call.

  • Type: OnHookedCalls

  • Fields:

    • noWaitRequest (Int)

    • answerWaitRequest (Int)

    • customerNoAnswer (Int)

  • Example: { noWaitRequest: 3, answerWaitRequest: 5, customerNoAnswer: 2 }

simultaneousDeviceCalls

  • Description: Number of devices that rang simultaneously for this call.

  • Type: Int

  • Example: 1

inactiveNumber

  • Description: Helper counter/flag for inactive numbers (if exposed by backend).

  • Type: Int

  • Example: 0

duration

  • Description: Aggregated durations for the call.

  • Type: CallOverviewDuration

  • Fields:

    • ring (DurationDetail: first, last, total)

    • queue (DurationDetail: first, last, total)

    • talk (DurationDetail: first, last, total)

    • total (Int) – total call duration

    • onHold (Int) – total time on hold

    • wait (Int) – total waiting time (e.g., queue + ring)

  • Example: { total: 45, talk: { first: 10, last: 10, total: 20 }, ring: { first: 10, last: 10, total: 20 }, queue: { first: 10, last: 10, total: 20 }, onHold: 5, wait: 26 }

answered

  • Description: Whether the call was answered (overall, by a human).

  • Type: Int (1 = answered, 0 = not answered)

  • Example: 1

active

  • Description: Whether the call is currently active.

  • Type: Int (1 = active, 0 = not active)

  • Example: 0

agentFirst

  • Description: First agent who handled (or was first to answer) in the journey.

  • Type: Agent

  • Fields (common):

    • id (Int)

    • name (String)

    • phone (String)

    • email (String)

    • answered (DateTime)

    • toTransfer (Int)

    • fromTransfer (Int)

    • licence (Licence)

  • Example: { id: 5555, name: "Agent Name A", phone: "0045…", answered: "2025-10-01 T10:15:21Z" }

agentLast

  • Description: Last agent who handled in the journey.

  • Type: Agent

  • Example: { id: 6666, name: "Agent Name B", phone: "0045…", answered: "2025-10-01 T10:16:30Z" }

agentList

  • Description: All agent display names involved in the call (answered or not).

  • Type: [String!]

  • Example: ["Agent Name A", "Agent Name B"]

agentListAnswer

  • Description: Agent display names who answered.

  • Type: [String!]

  • Example: ["Agent Name A"]

agentListNoAnswer

  • Description: Agent display names who were offered but did not answer.

  • Type: [String!]

  • Example: ["Agent Name B"]

queueFirst

  • Description: First queue the call entered.

  • Type: Queue

  • Fields:

    • id (Int)

    • name (String)

    • phone (String)

    • strategy (String)

    • timestart (DateTime)

    • failReason (String)

  • Example: { id: 6667, name: "Queue A", strategy: "rrmemory", timestart: "2025-10-01 T10:14:15Z", failReason: "queue_leave_abandon" }

queueLast

  • Description: Last queue the call entered.

  • Type: Queue

  • Example: { id: 6666, name: "Queue B", strategy: "rrmemory", timestart: "2025-10-01 T10:14:45Z", failReason: "queue_leave_timeout" }

queueList

  • Description: Names of all queues traversed by the call.

  • Type: [String!]

  • Example: ["Queue A", "Queue B"]

ivrFirst

  • Description: First IVR the call interacted with.

  • Type: IVR

  • Fields:

    • id (Int)

    • name (String)

    • phone (String)

    • timestamp (DateTime)

  • Example: { id: 9999, name: "Main IVR", phone: "0045…", timestamp: "2025-10-01 T10:13:55Z" }

ivrLast

  • Description: Last IVR the call interacted with.

  • Type: IVR

  • Example: { id: 9998, name: "Transfer IVR", phone: "0045…", timestamp: "2025-10-01 T10:14:05Z" }

ivrList

  • Description: Names of all IVRs traversed by the call.

  • Type: [String!]

  • Example: ["IVR A", "IVR B"]

queuePickup

  • Description: Queue pickup indicator/counter (if provided by backend).

  • Type: Int

  • Example: 0

time

  • Description: Start/end timestamps for the overall call journey.

  • Type: CallOverviewTime

  • Fields:

    • start (DateTime)

    • end (DateTime)

  • Example: { start: "2025-10-01 T10:13:35Z", end: "2025-10-01 T10:14:50Z" }

transferFirst

  • Description: First transfer details in the call.

  • Type: Transfer

  • Fields:

    • type (String)

    • answered (Int)

  • Example: { type: "blind", answered: 1 }

transferLast

  • Description: Last transfer details in the call.

  • Type: Transfer

  • Example: { type: "blind", answered: 1 }

transfers

  • Description: Total number of transfers performed in the call.

  • Type: Int

  • Example: 4

redirected

  • Description: Redirection reasons and counts during the call.

  • Type: Redirected

  • Fields:

    • total (Int)

    • noReason (Int)

    • noAnswer (Int)

    • notReachable (Int)

    • userBusy (Int)

    • unconditional (Int)

  • Example: { total: 5, noReason: 1, noAnswer: 1, notReachable: 1, userBusy: 1, unconditional: 1 }

recorded

  • Description: Whether the call was recorded.

  • Type: Int (1 = recorded, 0 = not recorded)

timeIvrClosed

  • Description: Timestamp when IVR closed condition occurred (if applicable).

  • Type: DateTime

  • Example: "2025-10-01 T10:13:40Z"

timeIvrTimeout

  • Description: Timestamp when IVR timeout occurred (if applicable).

  • Type: DateTime

  • Example: "2025-10-01 T10:13:45Z"

timeIvrDigit

  • Description: Timestamp when the user pressed a digit in the IVR (if applicable).

  • Type: DateTime

  • Example: "2025-10-01 T10:13:47Z"

  • Description: Last menu digit pressed and its routing destination.

  • Type: MenuDigit

  • Fields:

    • dialedNumber (String)

    • destination (String)

    • type (String)

  • Example: { dialedNumber: "1", destination: "My queue", type: "Queue" }

terminatedCallReason

  • Description: Final termination reason of the call.

  • Type: String (e.g., hangup, no_answer, busy, redirect_*, queue_leave_*, ivr_timeout, ivr_closed, answered_elsewhere, blind_transferred, etc.)

  • Example: "queue_leave_empty"

internal

  • Description: Whether the call was internal (within the organization) or external.

  • Type: Int (1 = internal, 0 = external/public)

saveKeyInput

  • Description: List of key/value inputs captured during IVR (if enabled).

  • Type: [SaveKeyInput!]

  • Fields:

    • variableName (String)

    • input (String)

  • Example: [{ variableName: "orderId", input: "A12345" }]

timestamp

  • Description: Server-side timestamp associated with the record emission/update.

  • Type: DateTime

  • Example: "2025-10-01 T10:15:00Z"



Agent Overview

idCall

  • Description: Unique identifier of the call (stable across transfers, queues, etc.).

  • Type: String (UUID)

  • Example: “42139dbf-f0a9-43e9-9b58-9999999”

callDirection

  • Description: Direction of the call.

  • Type: String (values: “incoming”, “outgoing”)

  • Example: “incoming”

active

  • Description: Whether this agent-leg is currently active.

  • Type: Int (1 = active, 0 = not active)

answered

  • Description: Whether the call was answered (by a human) for this agent-leg.

  • Type: Int (1 = answered, 0 = not answered)

agent

  • Description: Agent details for the offered/handled call.

  • Type: Agent

  • Fields (common): id (Int), name (String), phone (String), email (String), answered (DateTime), toTransfer (Int), fromTransfer (Int), licence (Licence)

  • Example: { id: 39940, name: “Joseph”, phone: “0034986…”, answered: “2025-10-01 T10:15:21Z” }

ivr

  • Description: IVR information associated with this agent-leg.

  • Type: IVR

  • Fields: id (Int), name (String), phone (String), timestamp (DateTime)

  • Example: { id: 29968, name: “Main IVR”, phone: “0034…”, timestamp: “2025-10-01 T10:14:10Z” }

queue

  • Description: Queue context from which the call was offered to the agent.

  • Type: Queue

  • Fields: id (Int), name (String), phone (String), strategy (String), timestart (DateTime)

  • Example: { id: 6667, name: “Queue A”, strategy: “rrmemory”, timestart: “2025-10-01 T10:14:15Z” }

customerTarget

  • Description: Target customer information.

  • Type: CustomerTarget

  • Fields: number (String)

  • Example: { number: “0034935475858” }

onHookedCalls

  • Description: Indicates if this agent-leg corresponds to an on-hook/callback flow.

  • Type: Int

transfer

  • Description: Whether a transfer occurred in this agent-leg.

  • Type: Int (1 = transferred, 0 = not transferred)

recorded

  • Description: Whether this agent-leg was recorded.

  • Type: Int (1 = recorded, 0 = not recorded)

time

  • Description: Timestamps for the agent-leg.

  • Type: AgentOverviewTime

  • Fields: start (DateTime), end (DateTime), answered (DateTime)

  • Example: { start: “2025-10-01 T10:13:35Z”, answered: “2025-10-01 T10:15:21Z”, end: “2025-10-01 T10:20:10Z” }

duration

  • Description: Aggregated durations for the agent-leg.

  • Type: AgentOverviewDuration

  • Fields: total (Int), ring (Int), talk (Int), hold (Int)

  • Example: { total: 420, ring: 10, talk: 360, hold: 50 }

simultaneousDeviceCalls

  • Description: Number of the agent’s devices that rang simultaneously.

  • Type: Int

agentEndReason

  • Description: Reason why the agent-leg ended (e.g., agent\_hangup, customer\_hangup).

  • Type: String

  • Example: “agent\_hangup”

voicemail

  • Description: Whether this leg resulted in a personal voicemail.

  • Type: Int (1 = voicemail, 0 = no voicemail)

internal

  • Description: Whether this agent-leg was part of an internal call (within the organization).

  • Type: Int (1 = internal, 0 = external/public)


Queue Overview 

idCall

  • Description: Unique identifier of the call. Remains the same across all transfers, queue jumps, and agent legs.

  • Type: String (UUID)

  • Example: “42139dbf-f0a9-43e9-9b58-9999999”

callDirection
  • Description: Direction of the call.

  • Type: String (values: incoming, outgoing)

  • Example: “incoming”

active

  • Description: Indicates whether this queue segment is currently active.

  • Type: Int (1 = active, 0 = not active)

answered

  • Description: Indicates if the call was answered (by a human) while in this queue.

  • Type: Int (1 = answered, 0 = not answered)

agent

  • Description: Details of the agent who ultimately handled or was offered the call from this queue.

  • Type: Object

  • Fields:

    • id: Int — Agent ID

    • name: String — Agent display name

    • phone: String — Agent phone number

    • email: String — Agent email address

    • answered: DateTime — When the agent answered the call

    • toTransfer: Int — Indicates if the call was transferred to this agent

    • fromTransfer: Int — Indicates if the call was transferred from this agent

    • licence: Object — Licence details (type, ccpro)

ivr

  • Description: IVR context associated with this queue segment.

  • Type: Object

  • Fields:

    • id: Int — IVR ID

    • name: String — IVR name

    • phone: String — IVR phone number

    • timestamp: DateTime — When the IVR was reached

queue

  • Description: Queue information for this call segment.

  • Type: Object

  • Fields:

    • id: Int — Queue ID

    • name: String — Queue name

    • phone: String — Queue phone number

    • strategy: String — Queue strategy (e.g., rrmemory, ring_all)

    • timestart: DateTime — When the call entered this queue

    • failReason: String — Reason the call left the queue (e.g., queue_leave_abandon, queue_leave_timeout)

customerTarget

  • Description: Information about the customer (caller or callee).

  • Type: Object

  • Fields:

    • number: String — Customer phone number

onHookedCalls

  • Description: Indicates if this queue segment was part of an on-hook or callback flow.

  • Type: Int (1 = yes, 0 = no)

transfer

  • Description: Indicates if a transfer occurred during this queue segment.

  • Type: Int (1 = transferred, 0 = not transferred)

recorded

  • Description: Indicates whether the call was recorded while in this queue.

  • Type: Int (1 = recorded, 0 = not recorded)

time

  • Description: Timestamps for this queue segment.

  • Type: Object

  • Fields:

    • start: DateTime — When the call entered the queue segment

    • end: DateTime — When the call exited the queue segment

duration

  • Description: Aggregated durations while the call was in this queue.

  • Type: Object

  • Fields:

    • total: Int — Total time in this queue segment

    • queue: Int — Time spent waiting in the queue

    • ring: Object — Ring time details (first, last, total)

    • talk: Int — Time spent talking with an agent

    • hold: Int — Time the caller was put on hold

    • wait: Int — Total waiting time (queue + ringing)

simultaneousDeviceCalls

  • Description: Number of agent devices that rang simultaneously during this queue segment.

  • Type: Int

agentEndReason

  • Description: Reason the call ended for this queue leg (e.g., agent_hangup, customer_hangup).

  • Type: String

voicemail

  • Description: Indicates if the call went to voicemail during this queue segment.

  • Type: Int (1 = voicemail, 0 = no voicemail)

internal

  • Description: Indicates whether this queue segment was part of an internal call (inside the organization).

  • Type: Int (1 = internal, 0 = external/public)


Common Nested Types


Agent

Description: Represents an agent (user) in the Telavox system. Contains basic identification and contact details, as well as transfer and licensing information.

Type: Object

Fields:

  • id: Int — Unique identifier of the agent.

  • name: String — Display name of the agent.

  • phone: String — Agent’s associated phone number.

  • email: String — Agent’s email address.

  • answered: DateTime — Timestamp when the agent answered the call (if applicable).

  • toTransfer: Int — Indicates if the call was transferred to this agent (1 = yes, 0 = no).

  • fromTransfer: Int — Indicates if the call was transferred from this agent (1 = yes, 0 = no).

  • licence: Object — Licence information assigned to the agent.

    • type: String — Licence type (e.g., Flow Fixed, Flow Mobile).

    • ccpro: Int — Indicates if the agent has a Contact Center Pro licence (1 = yes, 0 = no).

Queue


Description: Represents a call queue where calls are distributed to agents based on defined strategies.

Type: Object

Fields:

  • id: Int — Unique identifier of the queue.

  • name: String — Name of the queue.

  • phone: String — Phone number assigned to the queue.

  • strategy: String — Queue distribution strategy (e.g., rrmemory, ring_all).

  • timestart: DateTime — Timestamp when the call entered the queue.

  • failReason: String — Reason the call left the queue (e.g., queue_leave_abandon, queue_leave_timeout, queue_leave_digit, queue_leave_full).

IVR


Description: Represents an Interactive Voice Response system (automated menu) that the call passed through.

Type: Object

Fields:

  • id: Int — Unique identifier of the IVR.

  • name: String — Display name of the IVR.

  • phone: String — Phone number associated with the IVR.

  • timestamp: DateTime — Timestamp when the call interacted with this IVR.


DurationDetail


Description: Represents detailed duration metrics for a call stage (e.g., ring, queue, talk).

Type: Object

Fields:

  • first: Int — Duration of the first occurrence of this stage (in seconds).

  • last: Int — Duration of the last occurrence of this stage (in seconds).

  • total: Int — Total accumulated duration of this stage (in seconds).

MenuDigit


Description: Represents the menu input chosen by the caller when navigating IVR menus.

Type: Object

Fields:

  • dialedNumber: String — The number or key pressed by the caller.

  • destination: String — The destination object where the call was routed (e.g., a queue name).

  • type: String — Type of the destination (e.g., queue, agent, ivr).

Redirected


Description: Represents information about call redirections and their reasons.

Type: Object

Fields:

  • total: Int — Total number of redirections during the call.

  • noReason: Int — Redirections with no specific reason.

  • noAnswer: Int — Redirections due to no answer.

  • notReachable: Int — Redirections because the destination was unreachable.

  • userBusy: Int — Redirections because the user was busy.

  • unconditional: Int — Unconditional redirections triggered by call settings.

Transfer


Description: Represents information about a transfer event within a call.

Type: Object

Fields:

  • type: String — Type of transfer (e.g., blind, attended).

  • answered: Int — Indicates if the transferred call was answered (1 = yes, 0 = no).

CustomerTarget


Description: Information about the customer involved in the call (caller for incoming, recipient for outgoing).

Type: Object

Fields:

  • number: String — Customer phone number.

OnHookedCalls


Description: Information about on-hook or callback requests made during the call.

Type: Object

Fields:

  • noWaitRequest: Int — Customer refused to wait and did not request a callback.

  • answerWaitRequest: Int — Customer requested and accepted a callback.

  • customerNoAnswer: Int — Customer requested a callback but did not answer when the agent called back.

CallOverviewTime / AgentOverviewTime / QueueOverviewTime


Description: Represents key timestamps of a call, agent leg, or queue segment.

Type: Object

Fields:

  • start: DateTime — When the event started.

  • answered: DateTime — When the call was answered (if applicable).

  • end: DateTime — When the event ended.

SaveKeyInput


Description: Represents custom key inputs or variable captures saved during an IVR or call flow.

Type: Object

Fields:

  • variableName: String — Name of the variable stored.

  • input: String — Value entered or captured during the call.


Delete