Brekeke PBX Wiki

Tables

t_pbx_ua_log

Log information is generated for every call between Brekeke PBX and UAs. There are two records per call.

CREATE TABLE t_pbx_ua_log (      
   c_tenant_id             VARCHAR(20), /* Multi-tenant PBX */
   c_id                    BIGINT,
   c_instanceid            INT default 0,
   c_seq                   BIGINT,
   c_direction             TINYINT,
   c_type                  TINYINT,
   c_pbxuser               TINYINT,
   c_result                TINYINT,
   c_rescode               SMALLINT,  
   c_q850code              SMALLINT,  
   c_ars                   VARCHAR(50),
   c_phoneid               VARCHAR(50),      
   c_number                VARCHAR(50),
   c_real_number           VARCHAR(50),      
   c_pbx_number            VARCHAR(50),
   c_user                  VARCHAR(50),
   c_real_pbx_number       VARCHAR(50),      
   c_start                 DATETIME default NULL,
   c_start_talking         DATETIME default NULL,
   c_end                   DATETIME default NULL,
   c_tag                   VARCHAR(20) default ''
) DEFAULT CHARSET=utf8;

 

The indexes below will be required. Depending on your requirements, you may add more indexes for other columns as needed.

CREATE UNIQUE INDEX idx_pbx_ua_log_id on t_pbx_ua_log (c_tenant_id,c_id,c_seq);

 

c_tenant_id (Multi-tenant PBX)

This ID represents a tenant. It is used to identify individual tenants when there are multiple tenants hosting under one Brekeke PBX MT Edition. When using multiple Brekeke PBX servers to feed information into one database, set a unique ID for each tenant at the PBX servers.

For the version 3 or later, there is no [Tenant ID] field in each Tenant > [Options] setting page from Brekeke PBX Admintool. By default, tenant name will be put in column c_tenant_id when Brekeke PBX log database is in use.

To display [Tenant ID] field and insert value of [Tenant ID] in Brekeke PBX log database, add the following property in file config.properties and restart the machine where Brekeke PBX is installed:

config.properties is at <Brekeke PBX Installation Directory>/webapp/pbx/WEB-INF/work/pbx/

com.brekeke.pbx.Setting.TENANT_ID=true

 

c_id

This ID represents a room ID which specifies a call.

Each call can be differentiated by looking at the c_tenant_id values associated with the c_id.

 

c_instanceid

This ID represents a PBX instance (available on version 3.6 or later). This column will be used only when the following property set at Brekeke PBX Admintool > [Options] > [Advanced]

cti.logging.type3.instanceid=true

 

c_seq

This ID represents a talker ID which specifies a session between Brekeke PBX and UA.

 

c_direction

“1” represents an incoming session to Brekeke PBX.

“2” represents an outgoing session from Brekeke PBX.

 

c_type

This ID represents the type of call handled by Brekeke PBX.

0 missed missed call (call was not established)
1 in call received by Brekeke PBX
2 out call initiated by Brekeke PBX
3 transfer transferred call (transferred using Auto Attendant or Dial Pad command)
4 call-pickup call pickup feature is used
5 park-pickup call picked up after call park
6 hold-pickup call picked up after call hold
7 join joined conversation
8 supervisor supervise feature is used
9 resume call is resumed after being disconnected while call was on hold

 

c_pbxuser

“1” represents a Brekeke PBX user. “0” represents an external user.

 

c_result

Result codes.

0 in progress
1 connected (includes when the call is establishing)
2 busy
3 cancel
4 not found (e.g., phone number cannot be located)
5 timeout (call cannot be connected)

 

c_rescode

This ID represents the SIP response code generated when a call has been rejected. This column will be used when the following property set at Brekeke PBX Admintool > [Options] > [Advanced]

cti.logging.type3.rescode=true

 

c_q850code

This ID represents the Q.850 code generated when a call has been rejected. This column will be used only when the following property set at Brekeke PBX Admintool > [Options] > [Advanced]

cti.logging.type3.q850code=true

 

c_ars

ARS route name that is applied to the call.

When an ARS route is not used, “” (zero-length string) will be entered.

 

c_phoneid

For an incoming session to Brekeke PBX, this field is the phone number set in Brekeke PBX for the caller. If no phone ID can be applied to the call, it will be the real number used by UA.

For an outgoing session from Brekeke PBX, this field is the phone number set in Brekeke PBX for the called PBX users. If no phone ID can be applied to the call, it will be the real number dialed by UA.

 

c_number

The user number set in Brekeke PBX for this UA.

 

c_real_number

For an incoming session to Brekeke PBX, this field is the real number used by UA.

For an outgoing session from Brekeke PBX, this field is the real number to which Brekeke PBX sent the call.

 

c_pbx_number

For an incoming session to Brekeke PBX, this field is the user number to which Brekeke PBX sent the call. This number may not be the same as the number dialed by the caller.

For an outgoing session from Brekeke PBX, this field is the caller’s PBX user number.

 

c_user

User associated with the call (i.e., user who will be billed for the call).

 

c_real_pbx_number

For an incoming session to Brekeke PBX, this field is the real number dialed by the caller.

For an outgoing session from Brekeke PBX, this field is the caller number shown to the recipient. This number may not be the same as the caller’s PBX user number.

 

c_start

Time when a session starts.

 

c_start_talking

Time when the conversation starts (i.e., when the recipient responds to the call).

NULL is stored while UA is ringing or if the call is never established.

 

c_end

Time when a session ends. During a call, NULL is stored.

 

c_tag

Tag of the session (available on version 3.6 or later). This column will be used only when the following property set at Brekeke PBX Admintool > [Options] > [Advanced].

cti.logging.type3.tag=true

t_pbx_call_log

Log recorded by each call. This table will be used when certain properties for each call need to be saved. Currently this table is available only for calls with PSTN lines.

CREATE TABLE t_pbx_call_log (
   c_tenant_id             VARCHAR(20), /* Multi-tenant PBX */
   c_id                    BIGINT,
   c_main_seq              BIGINT,
   c_sparam1               VARCHAR(255),
   c_iparam1               INT,
   c_iparam2               INT
) DEFAULT CHARSET=utf8;

The indexes below will be required. Depending on your requirements, you may add more indexes for other columns as needed.

CREATE UNIQUE INDEX idx_pbx_call_log_id on t_pbx_call_log (c_tenant_id,c_id);

 

c_tenant_id (Multi-tenant PBX)

This ID represents a tenant. It is used to identify tenants when Brekeke PBX MT Edition is used to host multiple tenants under one server. When multiple Brekeke PBX servers are used to feed information into one database, set a unique ID for each tenant at the Brekeke PBX servers.

For the version 3 or later, there is no [Tenant ID] field in each Tenant > [Options] setting page from Brekeke PBX Admintool. By default, tenant name will be put in column c_tenant_id when Brekeke PBX log database is in use.

Check the setting in table t_pbx_ua_log about how to display [Tenant ID] field.

 

c_id

This ID represents a call. It is generated for every call. In environments where multiple tenants exist under the same server, there can be duplicate c_id values for different tenants.

Each call can be differentiated by looking at the c_tenant_id value associated with the c_id.

 

c_main_seq

c_seq in t_pbx_ua_log for external session of the call.

 

c_sparam1

Used for applications.

 

c_iparam1 and c_iparam2

Used for applications.

 

 

Yes No
Suggest Edit