1) There is a fence on LOC. 550 Km of the 740 Km Line of Control has been fenced for a better part of last decade..that is one of the reasons for massive reduction in successful cross border infiltration.
2) Fence isa few hundred yards on Indian side(hence does not violate the treaty), but makes movement from one side of the border other border to another side difficult..if not impossible ..especially if there is intense firing going around you.
3) You might have visited, a part of the border which might not have been fenced due terrain ..or did not get close enough to see it..but it is there. Infact work is going on to build another weather proof fence..which can stand Kashmir's heavy snowfall and avalanches.
All-weather LoC fence in Kashmir: Experts to visit border soon - Times Of India
4) Border fencing has helped reduce infiltration, a lot, but a still a small percentage manages to infiltrate it ..especially when Pakistani border post provides suppressing fire on Indian posts to help the infiltration bid.
PS: There are not only fences but motion sensors, thermal imagers etc on Indian side of border to detect the infiltration.