CREATE TABLE CallQueueCallback
(
    id BIGINT DEFAULT NULL,

    /* Identifier in CallQueue__queue */

    QueueId BIGINT UNSIGNED DEFAULT NULL,
    Queue BIGINT UNSIGNED NOT NULL,
    Number VARCHAR(50) DEFAULT NULL,
    Extension VARCHAR(6) DEFAULT NULL,
    ts BIGINT NOT NULL,
    Tries TINYINT DEFAULT 3,
    NextRetry BIGINT DEFAULT 0,
    LockId CHAR(32) DEFAULT NULL,
    Expires BIGINT DEFAULT NULL,
    PRIMARY KEY ( id ) AUTO_INCREMENT,
    UNIQUE KEY ( QueueId ),

    /* Queue Id */

    KEY ( LockId )

) ENGINE=INNODB CHARSET=UTF8;
