Female chickens are the ones that produce the egg song. They do it before they lay an egg to tell their flock members, especially the rooster, that they are going to lay an egg and therefore will be vulnerable during that time. Because of them being vulnerable, the rooster is supposed to sit with her while she lays an egg. After she lays the egg, she get off the nest and begins doing the egg song again—this time to tell the rooster to escort her back to the flock, to alert the other hens that she is done laying, and to scare off any predator that could have sneaked up on her while she was not looking. Not all roosters will accompany their hens, especially if they have too many hens to take care of. Similarly, not all hens will do an egg song. I have a few hens that do a chittering noise instead of an egg song, and the male never accompanies them as a result. When a hen begins doing an egg song, the rooster will do the egg song reply, which sounds similar but has less notes. It essentially means that he is aware of her egg song and knows she is about to be vulnerable for some time. It is like him reassuring the hen that he will be there to protect. Other hens often begin doing an egg song when one hen starts, even if they are not laying themselves. The particular reason for this remains unknown.