Every time you fire a mortar, 2 “chance” points are added to a pool and a random number is rolled between 1 and 100. If the random number is less than your chance points, then your location is revealed. This may result in a QRF or counter battery fire from the enemy. The “chance” points pool is specific to each time you fire a mortar round.
If you move more than 300 meters away from where your previous mortar round was fired from, the “chance” points reset to 0 for the next shot.
The counter battery fire mechanic applies to firing artillery as well as mortars.