it was when Ibrahim (alyhi salam) was ordered by Allah, as brother Mujahid states.
And proclaim among men the Pilgrimage: they will come to you on foot and on every lean camel, coming from every remote path,
Ibrahim said how will they hear me?? Allah said proclaim it, and We will convey it to mankind. So the prophet (alyhi salam) stood upon a mountain and proclaimed it. And thus every individual that is ordained that he/she will do Hajj, replied "LabaikaAllah" meaning at your service o Allah.