### Detailed Answered Calls Report Example (Bash) Source: https://ccmanual.issabel.com/en/api/call-data.html An example query for a detailed answered calls report, specifying a date range. This report provides granular information about each answered call. ```bash https://pbx_domain/stats/rest/index.php?entity=reports/answered_calls_detail&start=2012-08-01&end=2012-08-10 ``` -------------------------------- ### Asternic API - Queues Source: https://ccmanual.issabel.com/en/api/asternic-api.html Allows querying configured queues in the system, including their names and identifiers. It's also possible to get detailed information for a specific queue. ```APIDOC ## GET /stats/rest/index.php ### Description Retrieves information about configured call queues. ### Method GET ### Endpoint /stats/rest/index.php ### Query Parameters - **entity** (string) - Required - Set to `queues`. - **queue_id** (integer) - Optional - The ID of a specific queue to retrieve details for. ### Request Example ```bash /stats/rest/index.php?entity=queues ``` ### Response #### Success Response (200) - **queues** (array) - An array of queue objects, or a single queue object if `queue_id` is provided. - **status** (string) - Indicates the success of the request. #### Response Example ```json { "queues": [ { "queue_id": 1, "queue_name": "Sales" }, { "queue_id": 2, "queue_name": "Support" } ], "status": "success" } ``` ``` -------------------------------- ### GET /stats/rest/index.php Source: https://ccmanual.issabel.com/en/api/call-data.html Retrieves the real-time status of Asterisk queues, agent activity, and current day statistics. ```APIDOC ## GET /stats/rest/index.php ### Description Retrieves the real-time status of Asterisk queues, agent activity, and current day statistics. ### Method GET ### Endpoint /stats/rest/index.php ### Parameters #### Query Parameters - **entity** (string) - Required - The entity type to retrieve. Set to "realtime". ### Request Example https://pbx_domain/stats/rest/index.php?entity=realtime ### Response #### Success Response (200) - **waiting calls** (object) - Dictionary of queues containing active calls and wait times. - **summary** (object) - Aggregated statistics for each queue including agents, waiting calls, and performance metrics. #### Response Example { "waiting calls": { "100": { "1": { "calleridNum": "asterisk", "calleridName": "asterisk", "waitTime": "2" } } }, "summary": { "queue": { "100": { "Waiting": "1", "Agents": "1", "Avg Wait": "0" } } } } ``` -------------------------------- ### Get All Agents (Bash) Source: https://ccmanual.issabel.com/en/api/call-data.html Retrieves a list of all registered agents in the Call Center Stats PRO system. The response includes agent ID, agent name, and other relevant details. ```bash https://pbx_domain/stats/rest/index.php?entity=agents ``` -------------------------------- ### Advanced Static Agent Prefixing in Issabel PBX Source: https://ccmanual.issabel.com/en/pbx-setup/about-static-and-dynamic-agents.html This example demonstrates advanced mode for static agents in Issabel PBX, using prefixes to force dialing as specific Asterisk device types (SIP, PJSIP, IAX2, ZAP, DAHDi, Agent). This bypasses the normal dialplan and is for advanced users. ```plaintext S/101 P/201 X/301 Z/401 D/501 A/601 ``` -------------------------------- ### GET /queues Source: https://ccmanual.issabel.com/en/api/call-data.html Retrieve a list of all available queues or details for a specific queue. ```APIDOC ## GET /queues ### Description Retrieves a list of all queues available in the system. Optionally, provide a queue_id to get details for a specific queue. ### Method GET ### Endpoint /stats/rest/index.php?entity=queues[/queue_id] ### Parameters #### Query Parameters - **entity** (string) - Required - The entity type (queues) and optional path parameter (queue_id). ### Response #### Success Response (200) - **data** (array) - List of queue objects containing queue_id, queue, and queue_name. #### Response Example { "data": [ { "queue_id": "2", "queue": "2000", "queue_name": "2000" } ] } ``` -------------------------------- ### Static Agent Assignment in Issabel PBX Queues Source: https://ccmanual.issabel.com/en/pbx-setup/about-static-and-dynamic-agents.html This example shows how to list extensions to be assigned as static agents in an Issabel PBX queue. Each extension should be on a new line. Remote extensions or external numbers can be included. A penalty value can be appended after a comma. ```plaintext SIP/101 SIP/102 SIP/103 SIP/104,10 External/18005551212 ``` -------------------------------- ### Configure Incoming SIP Trunk Peer Details in Issabel PBX Source: https://ccmanual.issabel.com/en/pbx-setup/twilio-trunks.html Defines the SIP peer settings for incoming traffic from Twilio. This configuration must be repeated for each of the four Twilio IP addresses (54.172.60.0-3) by updating the host parameter. ```bash type=peer host=54.172.60.0 transport=udp port=5060 insecure=port,invite allow=ulaw qualify=yes context=from-pstn-e164-us ``` -------------------------------- ### GET /agents Source: https://ccmanual.issabel.com/en/api/call-data.html Retrieve a list of all registered agents or details for a specific agent. ```APIDOC ## GET /agents ### Description Retrieves a list of all agents registered with Call Center Stats PRO. Optionally, provide an agent_id to get details for a specific agent. ### Method GET ### Endpoint /stats/rest/index.php?entity=agents[/agent_id] ### Parameters #### Query Parameters - **entity** (string) - Required - The entity type (agents) and optional path parameter (agent_id). ### Response #### Success Response (200) - **data** (array) - List of agent objects containing agent_id, agent, and agent_name. #### Response Example { "data": [ { "agent_id": "6", "agent": "Andy Fisher", "agent_name": "Andy Fisher" } ] } ``` -------------------------------- ### GET /call Source: https://ccmanual.issabel.com/en/api/call-data.html Retrieve detailed event logs for a specific call using its unique identifier. ```APIDOC ## GET /call ### Description Displays detailed information and event logs for a call identified by its unique_id. ### Method GET ### Endpoint /stats/rest/index.php?entity=call/{unique_id} ### Parameters #### Path Parameters - **unique_id** (string) - Required - The unique identifier of the call. ### Response #### Success Response (200) - **data** (array) - List of event objects (e.g., ENTERQUEUE, CONNECT, COMPLETEAGENT) associated with the call. #### Response Example { "totalrecords": "3", "data": [ { "uniqueid": "1327498260.2637", "event": "CONNECT", "agentName": "Travis Spencer" } ] } ``` -------------------------------- ### Configure Outgoing SIP Trunk Peer Details in Issabel PBX Source: https://ccmanual.issabel.com/en/pbx-setup/twilio-trunks.html Defines the SIP peer settings for outgoing calls through the Twilio trunk. Requires the SIP URI from Twilio and optional authentication credentials if a Credential List is configured. ```bash host=your-sip-uri.pstn.twilio.com type=peer dtmfmode=rfc2833 canreinvite=no disallow=all allow=ulaw insecure=port,invite username=your-username secret=your-secret qualify=yes ``` -------------------------------- ### Example Answered Calls by Queue Report Response (JSON) Source: https://ccmanual.issabel.com/en/api/call-data.html A sample JSON response for the 'answered_calls_by_queue' report. It includes pagination details and a list of rows, each containing queue information and call statistics. ```json { "page":"1", "total":"1", "records":"6", "rows": [ { "Queue" : "2000", "Received" : "165", "% Calls" : "71.12" }, { "Queue" : "2001", "Received" : "3", "% Calls" : "1.29" }, { "Queue" : "2002", "Received" : "60", "% Calls" : "25.86" }, { "Queue" : "2003", "Received" : "2", "% Calls" : "0.86" }, { "Queue" : "2006", "Received" : "1", "% Calls" : "0.43" }, { "Queue" : "2007", "Received" : "1", "% Calls" : "0.43" } ] } ``` -------------------------------- ### GET /qstats/rest/index.php?entity=reports/answered_calls_detail Source: https://ccmanual.issabel.com/en/api/call-data.html Retrieves a detailed report of answered calls. If no date range is specified, it defaults to the current date. ```APIDOC ## GET /qstats/rest/index.php?entity=reports/answered_calls_detail ### Description Retrieves a detailed report of answered calls. If no date range is specified, it defaults to the current date. ### Method GET ### Endpoint `https://pbx_domain/qstats/rest/index.php?entity=reports/answered_calls_detail` ### Query Parameters - **start** (string) - Optional - Start date in year-month-day (yyyy-mm-dd) format. - **end** (string) - Optional - End date in year-month-day (yyyy-mm-dd) format. - **secondstart** (integer) - Optional - Start time of day in seconds. - **secondsend** (integer) - Optional - End time of day in seconds. - **agent** (string) - Optional - Filter by agent for \"_by_agent\" reports. - **queue** (string) - Optional - Filter by queue for \"_by_queue\" reports. ### Request Example ```bash https://pbx_domain/qstats/rest/index.php?entity=reports/answered_calls_detail&start=2012-08-01&end=2012-08-10 ``` ### Response #### Success Response (200) - **page** (string) - The current page number. - **total** (string) - The total number of pages. - **records** (string) - The total number of records. - **rows** (array) - An array of call detail objects. - **datetime** (string) - The date and time of the call. - **queue** (string) - The queue the call was routed to. - **agent** (string) - The agent who handled the call. - **callerid** (string) - The caller's ID. - **event** (string) - The event type of the call. - **waitTime** (string) - The time spent waiting. - **ringTime** (string) - The time the call was ringing. - **callTime** (string) - The duration of the call. - **agentName** (string) - The name of the agent. - **queueName** (string) - The name of the queue. - **recording** (string) - Link to the call recording. - **uniqueid** (string) - Unique identifier for the call. - **callflow** (string) - Link to the callflow details. - **url** (string) - Associated URL. - **did** (string) - Direct Inward Dialing number. #### Response Example ```json { "page":"1", "total":"1", "records":"232", "rows": [ { "datetime" : "01-08-2016 10:31:21", "queue" : "2002", "agent" : "Travis Spencer", "callerid" : "4787574818", "event" : "COMPLETEAGENT", "waitTime" : "10", "ringTime" : "10", "callTime" : "94", "agentName" : "Travis Spencer", "queueName" : "2002", "recording" : "test.wav", "uniqueid" : "1327498260.2637", "callflow" : "/asternicjquery/rest/index.php?entity=call/1327498260.2637", "url" : "www.lala.com", "did" : "" } ] } ``` #### Empty Response Example ```json { "page":"1", "total":"0", "records":"0", "rows": [] } ``` ``` -------------------------------- ### Example JSON Response for Search API (JSON) Source: https://ccmanual.issabel.com/en/api/call-data.html This JSON structure represents the typical response from the Issabel Search API. It includes pagination details like 'page', 'total', and 'records', followed by a 'rows' array containing detailed information for each call record, such as timestamps, agent details, queue information, and call durations. ```json { "page":"1", "total":"1", "records":"6", "rows": [ { "firstEvent" : "ENTERQUEUE", "overflow" : "1", "uniqueid" : "1327498260.2637", "callerid" : "4787574818", "dateStart" : "2016-08-01 10:31:11", "dateEnd" : "2016-08-01 10:32:55", "event" : "COMPLETEAGENT", "agent" : "Travis Spencer", "queue" : "2002", "waitTime" : "10", "talkTime" : "0", "combinedWaitTime" : "104", "totalDuration" : "104", "recordingFilename" : "test.wav", "agent_name" : "Travis Spencer", "queue_name" : "2002", "callflow" : "/asternicjquery/rest/index.php?entity=call/1327498260.2637" }, { "firstEvent" : "ENTERQUEUE", "overflow" : "1", "uniqueid" : "1327499602.2681", "callerid" : "2568314606", "dateStart" : "2016-08-01 10:53:32", "dateEnd" : "2016-08-01 10:54:48", "event" : "COMPLETEAGENT", "agent" : "Travis Spencer", "queue" : "2002", "waitTime" : "13", "talkTime" : "0", "combinedWaitTime" : "76", "totalDuration" : "76", "recordingFilename" : "test.wav", "agent_name" : "Travis Spencer", "queue_name" : "2002", "callflow" : "/asternicjquery/rest/index.php?entity=call/1327499602.2681" }, { "firstEvent" : "ENTERQUEUE", "overflow" : "1", "uniqueid" : "1327504603.2835", "callerid" : "4234324839", "dateStart" : "2016-08-01 12:16:53", "dateEnd" : "2016-08-01 12:17:39", "event" : "COMPLETEAGENT", "agent" : "Travis Spencer", ......data continues...... } ```