The Messenger of Allah ﷺ went to Quba to offer prayer. Then the Ansar (the Helpers) came to him and gave him a salutation while he was engaged in prayer. I asked Bilal: How did you find the Messenger of Allah ﷺ responding to them when they gave him a salutation while he was engaged in prayer. He replied: In this way, and Ja'far ibn Awn demonstrated by spreading his palm, and keeping its inner side below and its back side above. (Using translation from Abū Dāʾūd 927)
سَمِعْتُ عَبْدَ اللهِ بْنَ عُمَرَ ؓ يَقُولُ خَرَجَ رَسُولُ اللهِ ﷺ إِلَى قُبَاءَ يُصَلِّي فِيهِ قَالَ فَجَاءَتْهُ الْأَنْصَارُ فَسَلَّمُوا عَلَيْهِ وَهُوَ يُصَلِّي قَالَ فَقُلْتُ لِبِلَالٍ كَيْفَ رَأَيْتَ رَسُولَ اللهِ ﷺ يَرُدُّ عَلَيْهِمْ حِينَ كَانُوا يُسَلِّمُونَ عَلَيْهِ وَهُوَ يُصَلِّي؟ قَالَ يَقُولُ هَكَذَا وَبَسَطَ كَفَّهُ وَبَسَطَ جَعْفَرُ بْنُ عَوْنٍ كَفَّهُ وَجَعَلَ بَطْنَهُ أَسْفَلَ وَظَهْرَهُ إِلَى فَوْقَ