Child custody

Hello, I m 30 yes old married since 7yrs, I have 5+ yrs old daughter and I m living separately from husband since a year with my parents. It was started from domestic violence as he is short tempered, he used to hit me, verbal abuse all, many times he sent me to my parents after fights and again asked me to come back, even I used to go back again n again. After being in toxic marriage, I found myself lonely and I started talking with strangers on social platform.I never had any kind of affair or anything wrong with any person. I just used to talk to them . there were male n female both kind of frnds. When my husband recently hit me for the reason i denied for second child, I decided to leave home this time on my own. When he wasn't at home i left home with my daughter. I came tp my parents and in few days i started working also. Meanwhile he used to threaten me . he used to stalk me, he started checking my call history and started harassing me mentally. He is now threatening me on basis of call history tht I talked with some of my stranger frnds, he want ti prove me character less to not to get my child's custody. Last month he came to my place and asked me to send my child with him for 4 to 5 days.I showed humanity and without being insecure I sent her with him. Now its 1 and half month, he has not taken her back. Whenever I asked he use to fight on call. And now he told me to go in court and file for custody. He also brain washed her for living with him. I want my child back with me. She ia also saying tht she doesnt want to come back. Wht should I do..? He doesnt have any kind of proof like photographs, call recordings or anything suspicious again me then that call history I talked with some strangers, though i have never been in any kind of extra marital relationship.