'Handle changes to the mailbox.'

@callback
def handle_data(self, command, msg):

    from asterisk_mbox.commands import CMD_MESSAGE_LIST
    if (command == CMD_MESSAGE_LIST):
        _LOGGER.info('AsteriskVM    sent    updated    message    list')
        self.messages = sorted(msg, key=(lambda item: item['info']['origtime']), reverse=True)
        async_dispatcher_send(self.hass, SIGNAL_MESSAGE_UPDATE, self.messages)
