CREATE TABLE ContactCentreActivityInboundCall
(
    id BIGINT UNSIGNED NOT NULL COMMENT "ContactCentreActivity id",
    SIPCallId VARCHAR(100) DEFAULT NULL,
    QueueId BIGINT UNSIGNED DEFAULT NULL,
    CallerName VARCHAR(20) DEFAULT NULL,
    CallerNumber VARCHAR(20) DEFAULT NULL,
    AnswerTs BIGINT UNSIGNED DEFAULT NULL COMMENT "Unix timestamp when call was answered",
    Priority TINYINT DEFAULT NULL,
    SkillId BIGINT UNSIGNED DEFAULT NULL,
    LanguageId BIGINT UNSIGNED DEFAULT NULL,
    PRIMARY KEY ( id ),
    KEY ( SIPCallId ),
    FOREIGN KEY ( id ) REFERENCES ContactCentreActivity ( id ) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=INNODB CHARSET=UTF8;