'Parse the call information and set the sensor states.'

def _parse(self, line):

    line = line.split(';')
    df_in = '%d.%m.%y    %H:%M:%S'
    df_out = '%Y-%m-%dT%H:%M:%S'
    isotime = datetime.datetime.strptime(line[0], df_in).strftime(df_out)
    if (line[1] == 'RING'):
        self._sensor.set_state(VALUE_RING)
        att = {'type': 'incoming', 'from': line[3], 'to': line[4], 'device': line[5], 'initiated': isotime}
        att['from_name'] = self._sensor.number_to_name(att['from'])
        self._sensor.set_attributes(att)
    elif (line[1] == 'CALL'):
        self._sensor.set_state(VALUE_CALL)
        att = {'type': 'outgoing', 'from': line[4], 'to': line[5], 'device': line[6], 'initiated': isotime}
        att['to_name'] = self._sensor.number_to_name(att['to'])
        self._sensor.set_attributes(att)
    elif (line[1] == 'CONNECT'):
        self._sensor.set_state(VALUE_CONNECT)
        att = {'with': line[4], 'device': [3], 'accepted': isotime}
        att['with_name'] = self._sensor.number_to_name(att['with'])
        self._sensor.set_attributes(att)
    elif (line[1] == 'DISCONNECT'):
        self._sensor.set_state(VALUE_DISCONNECT)
        att = {'duration': line[3], 'closed': isotime}
        self._sensor.set_attributes(att)
    self._sensor.schedule_update_ha_state()
