Grind the masala ingredients in a mixer jar to make a fine paste.
Heat oil in a pan and add mustard seeds. Let it crackle.
Add dry red chilies, asafetida, curry leaves, ground masala, chopped onion, garlic, ginger, salt, turmeric powder, red chili powder, coriander powder, Kashmiri red chili powder, and sambar masala. Stir well.
Add tomatoes and cook until they are tender.
Add tamarind water and arhar dal. Stir well.
Add hot water as per your taste.
Add salt and jaggery (if using) to balance the spiciness and sourness of Rasam.
Garnish with chopped coriander leaves.
Serve hot with vada or plain rice.