I hope I did not confuse anyone.
escovolle is right, of course.
But one has to be careful not to interpret this as a simple rule that can be applied in all circumstances.
If Gary, Carol, and Fido are inside, Bob and Dave are outside, and Ted is in a nearby park with his mobile phone, things might get more complicated:
Gary: "Bob, shall I bring the dog out (to you) when I put the cat out (for the night)?" (although the speaker, Gary, is inside)
Bob: "Gary, don't forget to take the dog out (for walkies)." (although the speaker, Bob, is outside)
Gary: "Bob, can you ask Dave to take the dog out?"
Bob; "Yes, Gary, I'll ask Dave to bring the dog out."
Ted: Gary, Bob asked if Carol could bring the dog out when she puts the cat out; so can you ask Carol to take the dog out?"
That should remove any confusion. >(:-)