To make the paste, heat the oil in frying pan over medium heat. When hot, add the fenugreek seeds, cayenne peppers, asafetida, cumin seeds, coriander seeds and chana dal. Stir and fry for a few minutes until the seeds have darkened a few shades.
Remove from heat and transfer the mixture to a food processor or blender along with the coconut and 1/4 cup water. Blend into a paste, adding just a bit more water if necessary. Set aside.In a medium saucepan, combine the toor dal and 2 1/2 cups water. Bring to a boil, cover, reduce the heat to medium-low, and simmer gently for 1 hour until the dal is very soft. Stir occasionally. Do not drain.Meanwhile, soak the tamarind pulp in 1 1/2 cups hot water for 30 minutes. Strain the tamarind liquid into a bowl, squeezing out as much liquid from the pulp as possible. Discard the pulp and set the liquid aside.
Heat the coconut oil in a large saucepan over medium heat. When hot, add the mustard seeds, cumin seeds, fenugreek seeds, chili and curry leaves. Stir for 30 to 60 seconds until the mustard seeds turn grey and begin to splutter and pop.
Add the shallot and stir for another 2 minutes.
Add the vegetables, tamarind juice and salt to taste. Cover and simmer for 10 minutes until the vegetables are tender. Stir in the cooked toor dal and the paste and simmer for another 5 minutes.
Add 1/4 to 1/2 cup water if the sambar is too dry. Stir in the fresh cilantro or use as a garnish.