Pressure cook the toor dal with turmeric powder and 1 1/2 cup water for 3 whistles. Mash the dal and keep aside.
Soak the tamarind in 1/2 cup hot water and extract the pulp.
Pressure cook the vegetables except small onions, lady's finger and brinjal for 1 whistle or until cooked.
Heat oil and add all the ingredients for the masala and fry in low flame till the spices are slightly roasted and coconut has turned light golden. Cool and grind to a smooth paste adding little water.
Heat a large pot and add coconut oil. Add the shallots, lady's finger, brinjal and fry for 3-4 minutes. Then add the tamarind extract, salt and cook till the raw smell goes.
Add the remaining cooked vegetables, ground coconut-spice paste, mashed dal, salt and water as required. Mix well and bring to boil. Simmer for 5-6 minutes.
In a small pan, heat coconut oil, ghee and add mustard seeds, red chillies and curry leaves. Pour over the sambar. Cover with a lid for at least 20-30 minutes before serving.