You're not married with your son's father right? In that case, your son is an illegitimate child. And under the Family Code, the mother has sole parental right over an illegitimate child.
This is explicitly provided Article 176, which states that: "Illegitimate children shall use the surname, and shall be under the parental authority of their mother, and shall be entitled to support in conformity with this code. xxx”
Likewise, parental authority is defined as follows:
“Art. 209. Pursuant to the natural right and duty of parents over the person and property of their unemancipated children, parental authority and responsibility shall include the caring for and rearing them for civic consciousness and efficiency and the development of their moral, mental and physical character and well-being.”
Based on the foregoing, whoever is vested with parental authority over the person of a child shall take his/her custody. Considering that the law specifically designate you as the only parent who is vested with parental authority over your illegitimate child, it is only you who has the right over your child’s custody. This right cannot be taken from you unless there are compelling reasons to deprive you of such right and obligation as may be determined by the court. Thus, even if you are absent and cannot personally exercise such right, the father of your daughter cannot assume this right.
Likewise, only those persons mentioned by law may replace you in the exercise of this parental authority in the event that you cannot perform the same. The Family Code of the Philippines is clear about this:
“Art. 216. In default of parents or a judicially appointed guardian, the following person shall exercise substitute parental authority over the child in the order indicated:
(1) The surviving grandparent, as provided in Art. 214;
(2) The oldest brother or sister, over twenty-one years of age, unless unfit or disqualified; and
(3) The child’s actual custodian, over twenty-one years of age, unless unfit or disqualified.”