Reference13r1:Concept App Service Reports: Difference between revisions

From innovaphone wiki
Jump to navigation Jump to search
Line 65: Line 65:
   
   
  array_agg(array[ev.msg, COALESCE(ev.e164,''), COALESCE(ev.h323,''), COALESCE(ev.dn,'')] ORDER BY ev.id) AS callflow
  array_agg(array[ev.msg, COALESCE(ev.e164,''), COALESCE(ev.h323,''), COALESCE(ev.dn,'')] ORDER BY ev.id) AS callflow


====cdr_users====
====cdr_users====
Line 71: Line 70:
This table contains a timestamp '''missed_calls_time''' for the last call list access by a user '''sip'''. It is used to retrieve information about missed calls since the last use of mypbx/myApps.<br>
This table contains a timestamp '''missed_calls_time''' for the last call list access by a user '''sip'''. It is used to retrieve information about missed calls since the last use of mypbx/myApps.<br>
The timestamp '''clear_report_time''' indicates the last clearance time.<br>
The timestamp '''clear_report_time''' indicates the last clearance time.<br>
=== Database access ===
You have to manually grant access to the reporting database, e.g. for specific IP addresses, inside the file '''/mnt/sda2/pgsql/pg_hba.conf''', as the default configuration doesn't allow access from external.<br>
You can find the documentation for this file here: https://www.postgresql.org/docs/11/auth-pg-hba-conf.html<br>
<br>
The database user and password can be configured for every Reporting instance inside the AP Manager if you edit the instance.<br>
These database credentials are just used internally and not e.g. inside the PBX App Objects.


== Appendix ==
== Appendix ==

Revision as of 06:12, 9 April 2020


The App Service Reporting is an App Service which can be installed on an innovaphone App Platform. It is used to provide call lists in myApps or myPBX and to create call reports.

Applies To

  • innovaphone PBX from version 13r1

Technical Overview

Concept reporting.png

Apps

innovaphone-reporting

This is the Reporting UI App.

innovaphone-calllist

This is the Call list App.

Parameters:

Websocket

innovaphone-calllist-api

This is an App, which provides the Call list API (com.innovaphone.calllist). This API can be used to find the recent calls of a user.

Parameters:

Websocket

mypbx

This is the interface for the support of the old myPBX client.

PBX Manager Plugins

Reporting

With the Reporting plugin App objects can be created, edited and deleted for the provided Apps.

Configuration

There is also a configuration to enable compatibility for myPBX call lists in the AP-Reporting Plugin in the PBXManager. You have also to configure the new created account in the MyPBX configuration.

Concepts

Database Structure

cdrs

Each received cdr-xml is formed by a cdr tag and an undefined number of event and group tags. (Refer to: CDR)

This section is composed by four tables: cdrs, events, groups and cdr_properties. The first three tables contain the corresponding fields to store the information contained in the cdr, event and group tags.
Each CDR represents the call in the view of one PBX object. So there might be multiple CDRs for one call if multiple PBX objects are used within the call.

  • cdr fields: id, guid, user_guid, conf, sys, pbx, node, phys, device, h323, e164, cn, dn, email, dir, external, licensed, more_calls, conn_duration, alert_duration, call_duration, billing_duration, utc_stamp, cause, remote_e164, remote_h323, remote_dn, call_list, missed_call, status, further, user_id, callback_e164, callback_h323, callback_dn, callback_time, remote_clir
  • event fields: id, cdr_id, msg, ext, e164, h323, dn, conf, cause, time, clir
  • group fields: id, name, active, type, cdr_id.

id field is assigned by postgresql for each entry and has nothing to do with the information present in the cdr. It is different for each entry inside the table.

The events table has two additional fields, called cdr_id, to associate these events to the corresponding cdr entry and order_index to keep their position inside the cdr. Groups table has also the cdr_id field to associate the group entries to the corresponding cdr and events entries.

The table cdrp_properties from version 10 has been removed. Most columns can be now found directly in the table cdrs.
If you need the callflow in a similar way, you can run a query which creates an array string from the events table:

array_agg(array[ev.msg, COALESCE(ev.e164,), COALESCE(ev.h323,), COALESCE(ev.dn,)] ORDER BY ev.id) AS callflow

cdr_users

This table contains a timestamp missed_calls_time for the last call list access by a user sip. It is used to retrieve information about missed calls since the last use of mypbx/myApps.
The timestamp clear_report_time indicates the last clearance time.

Database access

You have to manually grant access to the reporting database, e.g. for specific IP addresses, inside the file /mnt/sda2/pgsql/pg_hba.conf, as the default configuration doesn't allow access from external.
You can find the documentation for this file here: https://www.postgresql.org/docs/11/auth-pg-hba-conf.html

The database user and password can be configured for every Reporting instance inside the AP Manager if you edit the instance.
These database credentials are just used internally and not e.g. inside the PBX App Objects.

Appendix