3CX User state history

Created by Oleg Agapov, Modified on Fri, 21 Apr, 2023 at 6:15 PM by Oleg Agapov

Create a separate database 'user_state' on the same 3CX instance (phonesystem with dbpassword


CREATE DATABASE "user_state"
    WITH
    OWNER = phonesystem
    ENCODING = 'UTF8'
    LC_COLLATE = 'English_United States.1252'
    LC_CTYPE = 'English_United States.1252'
    TABLESPACE = pg_default
    CONNECTION LIMIT = -1
    IS_TEMPLATE = False;



-- Table: public.operator_state_history
-- DROP TABLE IF EXISTS public.operator_state_history;

CREATE TABLE IF NOT EXISTS public.operator_state_history
(
    date timestamp with time zone,
    old_values text COLLATE pg_catalog."default",
    new_values text COLLATE pg_catalog."default",
    ext text COLLATE pg_catalog."default"
)

WITH (
    OIDS = FALSE
)

TABLESPACE pg_default;

ALTER TABLE IF EXISTS public.operator_state_history
    OWNER to phonesystem;


Specify the following in the TCXWebAPI.ini

DBS_NAME = user_state
DBS_PORT = 5480
DBS_LOGIN = phonesystem
DBS_PASSWORD =dbpassword
DBS_TABLE = public.operator_state_history


SELECT date, old_values, new_values, ext
  FROM public.operator_state_history order by date desc;




Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article