In 1959, Rav Moshe Feinstein was asked about a married woman who was having trouble becoming pregnant from her husband and was considering artificial insemination. Apparently, there was a practice known as adding a "booster," which would be some semen from the husband added to that of the (anonymous) donor. According to Rav Moshe Dovid Tendler (Rav Feinstein's son-in-law and a physician as well as a Rav), the booster was merely a ruse to calm the husband and to make him feel that the child was at least in part his.
Several issues come out of this point. First, Rav Moshe writes that any artificial insemination should use a non-Jewish donor, as that will pre-empt any potential issues of the child one day marrying a relative, since he will not be halachically related to his unknown father's family. Second, if the woman is concerned that her husband's fertility issues (in this case taken to be low sperm count) will heal in the next few months, then she should not be intimate with her husband during the next three months so as to confirm that the child belongs to the donor.
Rav Moshe also notes that if the identity of the donor is not known at all then it can be assumed in America to be that of a non-Jew, since most of the population is non-Jewish and since the way in which the semen is obtained is against halacha and thus it is unlikely to be from a Jewish donor.
Rav Moshe rejects the view that being artificially inseminated is tantamount to promiscuity, but he does note that it should be done with the consent of the husband since if the woman does become pregnant that will place burdens on the husband both financially, emotionally, and will limit his ability to be intimate with his wife.
In the final paragraphs of the teshuva Rav Moshe discusses a situation where the husband's issue is more that his strength is such that he cannot impregnate his wife, although his semen can if it could be made to reach the ova. In such a case the question becomes whether it is permissible for the husband to become his wife's artificial donor. In addressing this, Rav Moshe discusses some of the methods by which the semen is obtained from the donor (I am not going to get specific, although the teshuva does), and he concludes that since the purpose of obtaining the semen is in order to impregnate his wife, it would not be considered הוצאת זרע לבטלה and therefore he could be דש מבפנים וזורה מבחוץ.
In the second teshuva, written in 1981, Rav Moshe defends his earlier teshuvot, noting that he does not recommend artificial insemination as it does not constitute a fulfillment of פרו ורבו and it is possible that it will cause the husband to become jealous. However, in the case where the plan is to use the husband's semen, either because regular intercourse is not succeeding but both husband and wife have been determined to be fertile, or because the woman's menstrual cycle is such that it is virtually impossible for them to ever have a halachically acceptable opportunity to conceive, then Rav Moshe stands by his view that such a plan could be carried out.