Whenever the muadhdhin would stand and call the adhan for the Maghrib prayer in a mosque in Medina, whoever wished would stand and pray until the iqamah was called, and whoever wished would pray two rakahs and then sit down. This took place right before the eyes of the Prophet ﷺ.
حدثنا عبد الواحد أبو عبيدة الحداد حدثنا المعلى بن جابر يعني اللقيطي قال
كان إذا قام المؤذن فأذن صلاة المغرب في مسجد بالمدينة قام من شاء فصلى حتى تقام الصلاة ومن شاء ركع ركعتين ثم قعد وذلك بعيني النبي ﷺ
No references are available.
Its isnad is sahih. Mualla bin Jabir bin Muslim Luqayti was declared trustworthy by Ibn Hibban, while Bukhari in Tarikh al-Kabir 4/1/394 and Ibn Abu Hatim in his Jarh 8/332 said nothing about him. Bukhari narrated the hadith in similar wording in 2/106, no. 625, in the book of adhan, under the chapter on how much time is between the adhan and the iqamah.