public function get_lines_details_by_phone_name($NAME)
    {
        // Get all the phone object uuid=>names for a given site (based on device pool)
        $LINES = [];

        // get phone Line detailed object information
        $PHONE = $this->get_object_type_by_name($NAME, 'Phone');
        // if there are lines in the phone go get the uuid and name for each line dirn
        if (isset($PHONE['lines']) && is_array($PHONE['lines']) && count($PHONE['lines'])) {
            // loop through each line on the phone and suck out the uuid and dial pattern
            foreach ($PHONE['lines'] as $PHONELINE) {
                if (isset($PHONELINE['dirn']['pattern']) && $PHONELINE['dirn']['pattern'] && isset($PHONELINE['dirn']['uuid']) && $PHONELINE['dirn']['uuid']) {
                    // Phone has single linee
                    $UUID = $PHONELINE['dirn']['uuid'];
                    $LINE = $this->get_object_type_by_uuid($UUID, 'Line');
                    $LINES[$PHONELINE['dirn']['uuid']] = $LINE;
                } else {
                    // Phone has multiple lines
                    foreach ($PHONELINE as $SUBLINE) {
                        if (isset($SUBLINE['dirn']['pattern']) && $SUBLINE['dirn']['pattern'] && isset($SUBLINE['dirn']['uuid']) && $SUBLINE['dirn']['uuid']) {
                            // Save this line to the list of site lines we return
                            //$LINES[$SUBLINE['dirn']['uuid']] = $SUBLINE['dirn']['pattern'];
                            $UUID = $SUBLINE['dirn']['uuid'];
                            $LINE = $this->get_object_type_by_uuid($UUID, 'Line');
                            $LINES[$SUBLINE['dirn']['uuid']] = $LINE;
                        }
                    }
                }
            }
        }

        return $LINES;
    }