Afghan families are large and typically number seven to 10 people.
“The shelling has intensified after the recent incident in which some Pakistani soldiers were killed by Taliban militants,” Wasef said.
Wasef said officials “believe” the rockets were fired by Pakistani troops, who are operating along the border against homegrown Islamist insurgents.
The Pakistani military was not immediately reachable for comment.
Locals in Dangam district said that three residents, including a woman, were injured on Tuesday after rockets fired from Pakistan slammed into a home.
“Many people have already left their homes in the past two weeks. We have stayed, but we can not venture out of our hiding places because of the continued shelling,” a local resident said.
“We are poor people, we demand the government take action to protect us,” added another resident, Abdul Qader.
Pakistan said 13 soldiers were killed after militants crossed from Afghanistan into the northwestern district of Upper Dir, a key transit route that neighbours the Swat valley where Pakistan defeated a Taliban insurgency in 2009.
Six were killed in gunbattles on Sunday and another seven were beheaded after going missing, the military said.
The Pakistani Taliban claimed responsibility for the attack.
On Monday, Pakistan summoned the deputy Afghan ambassador in protest and to demand that Kabul “take appropriate measures” to stop incidents in the future.
Pakistan says rebels have regrouped in eastern Afghanistan.
Its troops have been fighting local Taliban for years but US Defence Secretary Leon Panetta has warned that Washington is running out of patience over Pakistani havens for militants who attack Americans in Afghanistan.
Islamabad imposed a blockade, now in its seventh month, on overland Nato supplies into Afghanistan since US air strikes killed 24 Pakistani soldiers along the Afghan border on November 26.