CREATE TABLE ContactCentreActivity
(
    id BIGINT UNSIGNED DEFAULT NULL AUTO_INCREMENT,
    ZoneId BIGINT UNSIGNED NOT NULL COMMENT "Zone in which the activity happened",
    Type ENUM( 'Call' ) COMMENT "What kind of activity (call, sms, chat, ...)",
    Direction ENUM( 'Inbound', 'Outbound' ),
    StartTs BIGINT UNSIGNED DEFAULT NULL COMMENT "Unix timestamp when the activity started",
    EndTs BIGINT UNSIGNED DEFAULT NULL COMMENT "Unix timestamp when the activity ended",
    Status ENUM( 'Waiting', 'Pending', 'Assigned', 'Completed', 'Abandoned', 'SentToVoicemail', 'TimeLimitExceeded' ),
    PRIMARY KEY ( id ),
    KEY ( ZoneId ),
    KEY ( Status )
) ENGINE=INNODB CHARSET=UTF8;
;