Combine the chicken with ingredients from onion to salt and rub well.
Place in a saucepan, pouring a cup of water, and cook on medium low flame, cooking by flipping the chicken till done.
While the chicken gets done, soak the dal for 15 minutes. Cook with water in a pressure cooker for 3-4 whistles till done. Drain and set aside. The dal should be cooked el dente.
To prepare the paste, heat oil and add 3/4 cup of coconut. Saute for a couple of minutes.
Add the remaining ingredients and saute till the coconut turns crisp and brown. Do not burn. Switch off and add the remaining 1/4 cup of coconut and mix. Allow to cool. Add a little water and grind into a smooth paste.
To prepare the filling, heat oil. Saute all ingredients except the coriander leaves till the onion is wilted.
Add the coriander leaves and 1 tbsp of the cooked chana dal, mix well and switch off.
Once the chicken is done, lift up and reserve into a plate. Fill the cavity with the prepared onion filling - just enough to fill. Tie the legs or prick with toothpicks to hold in place.
Into the gravy which is simmering (the one we cooked the chicken in), add the coconut paste, the remaining chana dal and the filling if any remaining.
Allow it to cook for a few minutes. Add the chicken and cook for another minute. Switch off.
Heat ghee and fry the pearl onions till crisp. Pour over the gravy and garnish with coriander leaves. Serve hot with rice or pathiri.
Notes
You can fill the cavity with a couple of boiled eggs, but I avoided it, since the kids are not very fond of eggs, and it may cause the cavity of the chicken to tear, if overstuffed.