In all of the original trilogy films, neither Leia or R2 are ever seen interacting. In Episode IV, we only see Leia insert the blueprints of the Death Star into his memory systems. But no dialogue is spoken. Yet on the canonical page for R2-D2 on Wookieepedia, the following is said...
Vader began to crush the armored transport using the force, Han told R2 "We need those guns!" R2 spoke in his customary beeps and clicks; which Leia translated to "Fire!"
This event takes place prior to the events of The Empire Strikes Back. One could assume that Leia was just saying what needed to be taken to action immediately, but is not told in what context she really means to say "fire!" Until now, Disney/Lucasfilm has not released or shown any content regarding this matter.