All praise be to Allah.

Al-Fayyoomi (may Allah have mercy on him) said:

The babgha (parrot) is a well-known bird. The word babgha may be masculine or feminine, and the plural is Babghawat.

It looks like it is not prescribed in any narration that a person must return the greeting of a parrot which has learnt to say salam(Islamic greeting). It is because saying salam is an act of worship and a supplication which requires intention on the part of the one who said it. In case of parrot, it has no such intention on part of his greeting. It is just trained to do so. The ruling is the same as that on a tape on which the greeting is recorded and can be heard. It is a transmission of sound and does not come under the ruling on greeting when it is broadcast live, in which case returning the greeting is prescribed and is a communal obligation (fard kifayah).

Al-Shaykh Muhammad ibn Salih al-‘Uthaymeen (may Allah have mercy on him) said:

Sometimes the greeting may be recorded and they put it on the tape and run it. If it is recorded then you are not obliged to return the greeting, because this is just a transmission of sound.

Based on this the parrot does not intend to give greetings of salam because it is just trained to do so and does not possess the reasoning power. A parrot only speaks what has been taught to it. It does not know why it is saying so or what it is saying.

One of the conclusions of the book Bahjat al-Asma‘ fi Ahkam al-Sama‘ fi’l-Fiqh al-Islami by Prof. ‘Ali ibn Dhariyan ibn Faris al-Hasan al-‘Anzi (published by Dar al-Manar in Kuwait) is:

The listener need not do the prostration of recitation if he hears it from a source that is not human, such as a trained bird like a parrot or hearing it from an echo. End quote.

And Allah knows best.