When a sentence in direct speech is in the present perfect continuous tense, the sentence changes to past perfect continuous tense in reported speech. Moreover, the conjunction 'that' is placed before the reported clause in reported speech. Here, the verb 'have been waiting' which is in the present perfect tense is changed to 'had been waiting' which is in the past perfect tense. Hence, it is correct.