CREATE TABLE CallQueueAllCalls
(
    id BIGINT UNSIGNED DEFAULT NULL,
    QueueId BIGINT UNSIGNED DEFAULT NULL,
    Queue BIGINT UNSIGNED DEFAULT NULL,
    CallId VARCHAR(255) DEFAULT NULL,
    CallerName VARCHAR(20) DEFAULT NULL,
    CallerNumber VARCHAR(20) DEFAULT NULL,
    EnterTs BIGINT UNSIGNED DEFAULT NULL,
    ExitTs BIGINT UNSIGNED DEFAULT NULL,
    ExitReason VARCHAR(100) DEFAULT NULL,
    PRIMARY KEY ( id ) AUTO_INCREMENT,
    UNIQUE KEY ( QueueId ),
    KEY ( QueueId, EnterTs ),
    KEY ( Queue, ExitTs ),
    KEY ( CallId )
) ENGINE=INNODB CHARSET=UTF8;
