First pressure cook the toor dal along with garlic, asafoetida, ⅛ tsp turmeric and sufficient water for 3 whistles or until done. Once the pressure subsides, mash it to fine paste and keep aside until use.
Soak the tamarind in ¼ cup of water for about 10 mins and extract the juice and keep aside until use. Also, chop the veggies and keep aside. While chopping the avarakkai, remove the thread like part from the side of it.
Heat a pan in medium flame and dry roast all the ingredients listed under "To dry roast and grind" until the coriander seeds starts changing color. Turn off the flame and transfer to a plate let it come to room temperature. Now grind it into a coarse powder. Keep covered until use.
Now, heat a pan with oil, add in the mustard and once it splutters, add all the other ingredients listed under "To temper". Once the urad dal turns golden, add in the curry leaves, green chilli, onion and saute until onion turns translucent. Follow it by tomato and saute for 30 sec. Then add the prepared tamarind extract along with about 2 cups of additional water and mix well. Leave it to cook.
When the sambar comes to a rolling boil, add in the avarakkai along with salt, ¼ tsp of turmeric, sambar powder and mix well. Turn the flame to low-medium and let it continue to cook. Once the avarakkai is half cooked, add the mashed dal, the prepared coarse powder and mix well. At this stage check for the consistency of sambar and add more water if needed.
Let the sambar simmer for few more minutes until the avarakkai is fully done. Finally, add the sugar/jaggery and coriander leaves, mix well and turn off the flame.
Serve hot with rice and any spicy South Indian side.