Given the facts presented, the answer to the question of your legal righs depends on whether you have been established and declared as being the child's LEGAL father.
By itself, being the biological father of a child born to an unmarried woman does not automatically give you any legal rights, nor does your being the biological father of such a child, by itself, impose any obligations on the mother
. Until and unless you are established, declared or otherwise recognized and deemed as being the child's "LEGAL father" through one of the various legal procedural methods for doing so, you are a "non-entiry" in the eyes of the law, meaning that you have no legal rights (and no legal responsibilities). And this is true regardless of where the mother is living and regardless of whether she has any criminal charges pending against her in which you are the criminal victim.
Generally, legal paternity
is establishe the mother and the biological father signing a form known as a Voluntary Acknowlegment of Paternity and causing it to be filed with the state's Vital Records agency. Alternitively, you (or the mother) may commence a legal proceeding (either judicially or administratively) to establish your legal paternity of the child.
But until legal paternity is established, you don't have any rights. Why the mother has now "filed a petition for sole custody" is unclear, since there was no reason for her to do so (unless legal paternity has been previously established). Under the circumstances, your best course of action is to file a motion in the court in which the "sole custody" proceeding is pending, asking that the case be dismissed on the basis of lack of jurisdictional authority (assuming you have a valid legal theory on which to make that arugment). Keep in mind that she does not necessarily have to be a resident of the state in which the legal action is filed (although it usually helps). The bigger and more important question is whether the court in which she filed her lawsuit has "subject matter jurisdiction" to hear and render judgment on the legal controversy presented.
You would be well-advised to confer with a lawyer in the state in which the lawsuit is pending for a definitive and specific case evaluation and analysis of the facts and circumstances, and obtain direction as to how and what to do to challenge the court's jurisdictional authority. I wish you wll in the legal pursuits.
NOTE: I realize that this answer may not be entirely to your liking, and I regret being the bearer of information that you really don’t want to hear. But it would be unfair to you and unprofessional of me were I to provide you with anything less than truthful and honest information. I hope you understand.
---> NOTICE AND DISCLAIMER (“The Fine Print”): The foregoing response is based only on the facts gleaned from your inquiry and does not constitute a definitive legal analysis or evaluation of the facts and circumstances of your particular case and the law applicable thereto. The information provided here should not be the sole basis for your decision(s) regarding the handling or resolution of the legal problem or issue presented. Limitations and restrictions of this forum prevent any claim or guarantee as to the completeness, accuracy or adequacy of the information contained herein and no such claim is made or guarantee given. The foregoing response to your inquiry is not intended to be and should not be accepted as a substitute for the professional legal advice and counsel that can only be given by a lawyer licensed to practice in the state that has jurisdictional authority over the case. I am licensed to practice law only in the state of Oregon. No attorney-client relationship is intended or created by or through the response(s) given here. (Sorry this is so long. But I’m a lawyer, so it should come as no surprise.)
Having answered your question, please acknowledge by clicking the green “ACCEPT” button. That will allow me to be paid for the time spent in answering your inquiry. Your question will not close, and you will still have the opportunity to follow-up if needed. Also, please add a few words of compliment in the feedback space. It isn’t required but it sure boosts my ego! Thank you!