If the wire for an in-ground system has been installed for a number of years, it may become degraded or have small breaks that cause it to work intermittently.
One of the easiest ways to identify this issue is to walk your boundary with the e-collar.
If it beeps in some areas, but not others, there is likely an issue with the underground wires.
If the insulated wire has been buried underground then damage is very unlikely, but testing the fence can confirm that the problem is not in the wire.
If there ever seems to be damage to the underground component of your fence, check back into any areas where you know that digging may have occurred.
Also check any areas that commonly face vehicle traffic, as the fence can become damaged from the weight of the vehicles especially if the soil shifts over time due to vehicle traffic.
Once you have located the partial break in invisible fence, it needs to be spliced back together.
In order to do this, you will need to use a high-quality underground wire splicing kit.