There was a question like this beforehand, you cant stop the sentries from running out of bullets but there is a work around.
It would involve you using two time delayed platforms, 2 platforms already at ground level with one red and one blue sentry on it, delayed for, for example, 3 minutes. Then you would have another 2 sentries, one red and one blue, either behind or infront of the other two, below the ground in a compartment with a delay time the same as the ones that are above the ground.
So, you have 4 sentries, 2 that are above, and 2 below. When the delay expires, the "active" two sentries drop down into their compartment, and the "inactive" two come up and replace the other 2.
That way you get a cool effect with some moving objects ect. You could even have an output that is delayed to disable the 2 that drop down, so incase the bullets havent fully run out it doesnt glitch / act weird.
The way to block each sentry from shooting each other is to use tool textures between the 2 sentrys, you would need, i think, Block LOS and Block Bullets.
This will prevent the sentrys from looking at each other and block any bullets fired between them. The two you need look like:
and
Note: im not sure if the texture part works (untested) but the bit about the platforms and 3 sentries will def work.
I hope that works / is of any use. Thats all i can think of atm, but maybe my basis can inspire some more replies and more great input for you =]