def _parse_response(self, data):
        """Parse server response to get mapped address"""
        packet_type, length = struct.unpack(">2H", data[:4])
        if packet_type != BINDING_RESPONSE:
            raise ValueError("Invalid response type!")
        if data[4:20] != self._transaction_id:
            raise ValueError("Invalid response transaction ID!")

        # Walk through all response attributes to find MAPPED_ADDRESS
        for attr_id, value_length, value, start_offset in self._parse_attributes(data[20:length + 20]):
            if attr_id == MAPPED_ADDRESS:
                ip_address, port = self._parse_mapped_address(value)
                break

        return (ip_address, port)