The appellant, Jeffrey Scott Moore, appeals his convictions for domestic violence in the third degree based on the underlying offense of assault, see § 13A-6-132, Ala.Code 1975; harassment, see § 13A-ll-8(a)(l)b., Ala.Code 1975; and harassing communications, see § 13A. — 11—8(b)(1), Ala.Code 1975. Moore was sentenced to one year in jail; that sentence was split and he was ordered to serve 90 days in jail and 2 years on probation. The trial court also ordered Moore to pay the medical bills incurred by the victim, his ex-wife, Karen Kelly, and to pay his child-support *147arrearage in full within six months of the date of the sentencing order.
The State’s evidence tended to show the following: Moore and Kelly were married in May 2001; they separated in March 2003. After the separation, Moore lived in Florida and Kelly lived in Leeds with their daughter. On December 31, 2003, Moore verbally threatened Kelly. As a result of Moore’s threat, Kelly obtained an order of protection.
On September 15, 2004, Moore went to Leeds to see Kelly and his daughter. Moore and Kelly left Kelly’s daughter with a friend and were on their way to have dinner when they began arguing over financial matters. According to Kelly, Moore began calling her names and hit her on her left shoulder as he was driving her vehicle. Kelly told him to pull the car over and to get out. He kept driving, however, and the argument continued. Kelly said Moore hit her on her right thigh, her chest, and then hit her so hard in the face that “blood went everywhere.” (R. 38.)
Steven Todd Huddleston testified that as he was driving in Leeds on the evening of September 15, 2004, he pulled up next to a sport utility vehicle, or SUV, and saw a person in the passenger seat trying to get his attention. When the SUV pulled away, Huddleston followed it. The SUV stopped in front of a house, and the passenger door opened. Huddleston identified Kelly as the individual who got out of the vehicle from the passenger side. Hud-dleston said that she had blood on her face. A man got out of the SUV on the driver’s side and walked toward Huddle-ston. At trial, Huddleston identified the man as Moore. Huddleston said that he rolled his window down when Moore walked up to his truck. Moore told him that Kelly was his wife, that she had started a fight with him, and that he was leaving. He handed Huddleston Kelly’s car keys, then got in his own car and drove away. Kelly telephoned the police to report the assault.
Huddleston also testified that when he spoke with Moore he did not see any blood or scratches on Moore and that Moore’s shirt was not torn. Huddleston stayed with Kelly until the police arrived.
Meanwhile, Moore went to a friend’s house in Hoover. The friend telephoned the police. Officer Smitty Avery of the Hoover Police Department responded to the call. He said when he saw Moore, Moore looked like he had been “in some sort of physical altercation.” (R. 154.) The next day, Moore filed a domestic incident/offense report with the police. (R. 156.)
Kelly sustained a number of bruises and a broken nose as a result of the altercation with Moore. Dr. Ronald McCoy, an ear, nose, and throat specialist, testified that he treated Kelly in September 2004 for a broken nose. He said that Kelly’s nose had been broken from left to right, which is consistent with Kelly’s description of the altercation, in which she was sitting in the passenger seat of the car when she was hit by Moore, who was in the driver’s seat.
In addition to evidence regarding the assault, Kelly also presented telephone bills that showed that between September 14, 2004, and October 29, 2004, Moore telephoned Kelly over 200 times. Kelly said during that same time, Moore left numerous threatening messages on her telephone-answering machine and he sent her several threatening text messages on her cell phone. Kelly notified the police of the threats. She testified that she felt frightened and intimidated by Moore.
Moore testified in his own defense. He denied having hit Kelly. He said that on the day of the alleged assault he and Kelly were going to dinner and he was driving. *148Kelly had been drinking, he said, and when he passed the restaurant Kelly hit him in the temple with her shoe. She attacked him, he said, trying to get control of the car. When he made an abrupt stop her head hit the steering wheel and bounced off the dashboard. That was how Kelly broke her nose, Moore said. He .also testified that although he had made a lot of telephone calls to Kelly, some were made when Hurricane Ivan was about to hit the Gulf Coast; he testified that he never made any threats.
The jury convicted Moore of domestic violence based on the underlying offenses of assault, harassment, and harassing communications. This appeal followed.
I.
Moore contends that the trial court abused its discretion in allowing Dr. McCoy to testify as to what Kelly had told him when he was treating her broken nose. Specifically, he argues that the hearsay statement that Kelly made to Dr. McCoy, i.e., that her injury was caused as a result of an “altercation with her husband while they were driving,” was not admissible under the medical-diagnosis hearsay exception in Rule 803(4), Ala. R.Evid. He asserts that the statement was not admissible because it did not concern the cause of her injuries but was a statement of fault and that statements of fault are not admissible under the medical-diagnosis exception recognized in Rule 803(4), Ala.R.Evid.
The admission of evidence under a hearsay exception is within the sound discretion of the trial court. See Lacy v. State, 673 So.2d 820, 825 (Ala.Crim.App. 1995) (and cases cited therein). Rule 803(4), Ala. R. Evid., provides that “[sjtatements made for purposes of medical diagnosis or treatment and describing medical history, or past or present symptoms, pain, or sensations, or the inception or general character of the cause or external source thereof insofar as reasonably pertinent to diagnosis or treatment,” are exceptions to the general rule excluding hearsay testimony.
This Court, in Biles v. State, 715 So.2d 878, 887 (Ala.Crim.App.1997), explained the scope of this hearsay exception:
“Rule 803(4) permits ‘all statements serving reasonably as the basis of diagnosis or treatment ... [to be admitted] as substantive proof of the matter asserted.’ Ala. R. Evid. 803(4), Advisory Committee’s Notes. In determining whether a statement comes within this hearsay exception, courts have applied a ‘two-pronged test.’ The first prong ‘is the requirement that the statement must be one upon which medical personnel reasonably rely in diagnosis and treatment. The second prong consists of a requirement that the declarant possess a motive which is consistent with the rule’s underlying purpose ... [of] seeking diagnosis or treatment.’ McElroy’s Alabama Evidence § 261.02(4) (5th ed.1996).”
In Ex parte C.L.Y., 928 So.2d 1069 (Ala.2005), the Alabama Supreme Court upheld the trial court’s admission of a treating physician’s testimony concerning statements made to him by a sexual-abuse victim regarding the identity of her abuser. The Supreme Court stated:
“K.H. also made statements to a treating physician in the emergency room while she was being treated following the sexual abuse. When the doctor asked her if she had ever been touched inappropriately, K.H. stated that C.L.Y. had pulled off her panties while they were in an automobile and had rubbed her vaginal area and had put lotion on her. These statements are admissible *149under the exception to the hearsay rule set out in Rule 803(4), Ala. R. Evid., for ‘Statements for Purposes of Medical Diagnosis or Treatment.’ Although statements indicating fault normally do not qualify for this hearsay exception, in cases of sexual abuse where the identity of the perpetrator is related to the treatment of the emotional and psychological injuries suffered by the victim, such statements regarding identity can fall within this exception to the hearsay rule. See Moore v. C.F. (In re Moore), 165 B.R. 495, 498-99 (M.D.Ala.1993).”
928 So.2d at 1073 (emphasis added). The case relied on by the Alabama Supreme Court, Moore v. C.F., 165 B.R. 495 (M.D.Ala.1993), stated:
“Admittedly, the advisory committee notes to Rule 803(4) provide that ‘Statements as to fault would not ordinarily qualify’ as an exception to hearsay under the rule. The notes give as an example that ‘a patient’s statement that he was struck by an automobile would qualify, but not his statement that the car was driven through a red light.’ Fed. R.Evid. 803(4) advisory committee notes. Similarly, courts have held that statements as to identity do not ordinarily qualify as an exception. [United States v.] Iron Shell, 633 F.2d [77] at 84 [ (8th Cir.1980) ]. As the Eighth Circuit explained in [United States v.] Renville, [779 F.2d 430 (8th Cir.1985) ].
“ ‘Statements of identity seldom are made to promote effective treatment; the patient has no sincere desire to frankly account for fault because it is generally irrelevant to an anticipated course of treatment. Additionally, physicians rarely have any reason to rely on statements of identity in treating or diagnosing a patient. These statements are simply irrelevant in the calculus in devising a program of effective treatment.’
“779 F.2d at 436.
“However, as the Eighth Circuit further recognized, it is only ‘ordinarily’ true that statements of fault and identity do not fall within Rule 803(4)’s hearsay exception for medical diagnosis and treatment. Renville, 779 F.2d at 436; see also Fed.R.Evid. 803(4) advisory committee notes (statements of fault ‘not ordinarily admissible’). ‘Sexual abuse of children at home presents a wholly different situation.’ Renville, 779 F.2d at 437. Statements by a child abuse victim that the abuser is a member or friend of the victim’s immediate household are reasonably pertinent to treatment. ‘Statements of this kind differ from the statements of fault identified by the Rules Advisory Committee ... in a crucial way: they are reasonably relied on by a physician in treatment or diagnosis.’ Id. at 436-37. Because ‘child abuse involves more than physical injury,’ id. at 437, the mental health provider or ‘physician must be attentive to treating the emotional and psychological injuries which accompany this crime.’ Id. Therefore, ‘[t]he exact nature and extent of the psychological problems which ensue from child abuse often depend on the identity of the abuser.’ Id. Because this was no less true with regard to the treatment C.F.’s counselor provided to C.F., it was appropriate and necessary that C.F. reveal to her counselor the identity of her abuser.
“Statements of identity by a minor receiving treatment for sexual abuse can also meet the first part of the two-part test for admission of out-of-court statements pursuant to Rule 803(4) — that is, ‘the declarant’s motive in making the statement must be consistent with the purposes of promoting treatment.’ Ren-ville, 779 F.2d. at 436. If the child is *150aware that the identity of the abuser is important to diagnosis and treatment, then the child’s ‘motivation to speak truthfully is the same as that which insures reliability when he recounts the chronology of events or details symptoms of somatic distress.’ Id. at 438. It is circumstantially apparent from the record that C.F. was fully aware that her past and present relationship to Moore — and thus her need to identify Moore as her abuser — was very much a part of her treatment. Nothing in the record indicates that C.F.’s motive in identifying Moore as her sexual abuser was other than as a patient responding to a mental health counselor’s questioning for prospective treatment.”
165 B.R. at 498-99.
We believe that the rationale employed by the Supreme Court in C.L.Y. would also apply to victims of domestic violence. In United States v. Joe, 8 F.3d 1488 (10th Cir.1993), the United States Court of Appeals for the Tenth Circuit recognized that Rule 803(4), Fed.R.Evid.,1 which is identical to Rule 803(4), Ala.R.Evid., applied to an admission made by a domestic violence victim to a treating physician concerning the identity of her abuser. The court noted:
“Unlike the victims in the cases cited above, Ms. Joe was not a child but rather the estranged wife of the alleged sexual abuser. However, the identity of the abuser is reasonably pertinent to treatment in virtually every domestic sexual assault case, even those not involving children. All victims of domestic sexual abuse suffer emotional and psychological injuries, the exact nature and extent of which depend on the identity of the abuser. The physician generally must know who the abuser was in order to render proper treatment because the physician’s treatment will necessarily differ when the abuser is a member of the victim’s family or household. In the domestic sexual abuse case, for example, the treating physician may recommend special therapy or counseling and instruct the victim to remove herself from the dangerous environment by leaving the home and seeking shelter elsewhere. In short, the domestic sexual abuser’s identity is admissible under Rule 803(4) where the abuser has such an intimate relationship with the victim that the abuser’s identity becomes ‘reasonably pertinent’ to the victim’s proper treatment.”
8 F.3d at 1494-95.
Here, Dr. McCoy testified that he examined Kelly, who was complaining of pain in her nose, recurring nosebleeds and “a deviation in her external nose.” (R. 97.) Dr. McCoy said that Kelly had a broken nose. Over Moore’s objection, Dr. McCoy testified that, while he was treating Kelly she explained to him that the break had occurred when “she was in an automobile and had an altercation with her husband while they were driving.” (R. 98.) Based on the rationale of the Alabama Supreme Court in Ex parte C.L.Y., and the United States Court of Appeals in United States v. Joe, we hold that Kelly’s statements to Dr. McCoy concerning the cause of her injuries and the identity of the person who committed the injuries were admissible under Rule 803(4), Ala.R.Evid., for the purpose of treating Kelly’s overall medical condition.
*151II.
Moore next contends that the trial court erred in limiting his cross-examination of Kelly regarding matters relevant to her credibility and veracity. Specifically, Moore asserts that the trial court erred in limiting Moore’s questioning of Kelly regarding her failure to follow through on her obligation pursuant to their judgment of divorce which directed Kelly to “cooperate to try to dismiss criminal charges pending against” Moore. (CR. 186.)
Initially we note that
“ ‘ “The scope of cross-examination in a criminal proceeding is within the discretion of the trial court, and it is not reviewable except for the trial judge’s prejudicial abuse of discretion. The right to a thorough and sifting cross-examination of a witness does not extend to matters that are collateral or immaterial and the trial judge is within his discretion in limiting questions which are of that nature. Collins v. State, [Ala.Crim.App., 364 So.2d 368 (1978).]” ’
“Burton v. State, 487 So.2d 951, 956 (Ala.Crim.App.1984), quoting Cobum v. State, 424 So.2d 665, 669 (Ala.Crim.App.1982).”
Gamble v. State, 791 So.2d 409, 434 (Ala.Crim.App.2000).
On the day before Moore’s trial Kelly apparently said that she had her “spurs on” and was “rearing to go.” (R. 81.) Moore’s attorney said that that comment was “absolutely indicative of her mindset to not cooperate. I think it’s absolutely relevant to one of the issues in this case, and it’s certainly relevant to her ability to tell the truth.” (R. 81.) The trial court, however, said that it did not see how Kelly’s comment regarding being ready to go forward with the trial had anything to do with whether she had intended to cooperate with attempting to have the case against Moore dismissed. “That doesn’t mean that she hasn’t made efforts or has made efforts. It just meant yesterday at 10:00 or 10:30, whenever the speech was had, it just meant that at that point, she was ready to try her case.” (R. 81.)
The trial court did allow Moore’s attorney to question Kelly about the terms of the divorce judgment, including her agreement to cooperate in having the criminal charges against Moore dismissed. The court did not allow Moore’s attorney to question Kelly about the comments she made the day before trial.
We agree that the comments made by Kelly the day before the trial had nothing to do with whether she had cooperated in having the criminal charges dismissed. Moore also failed to adequately explain how Kelly’s veracity could be impugned by her eagerness, on the day before trial was set to begin, to put her “spurs on” and have the trial get underway. Based upon the evidence before us, we cannot say that the trial court abused its discretion in limiting Moore’s ability to cross-examine Kelly regarding comments she made on the day before Moore’s trial was to begin.
III.
Moore last contends that the trial court did not have jurisdiction to order him to pay the child-support arrearage that had accrued since the entry of final divorce judgment. In sentencing Moore on January 18, 2007, the trial court ordered that “all child support owing to [Kelly] shall be brought current by July 19, 2007” — six months after the date of sentencing.
A review of the record shows that the trial court’s decision to order that Moore pay the child-support arrearage was the result of a request made by Moore’s own trial counsel. At Moore’s sentencing hear*152ing, Maxwell Pulliam, who represented Moore both at trial and on appeal, informed the trial court that the foreperson of the jury had told him that the jury wanted to recommend that Moore not receive prison time and suggested that instead, Moore be sentenced to counseling, that he be required to pay Kelly’s medical expenses, and that he be ordered to catch up on his child-support obligation. (Sentencing hearing, R. 11.) Pulliam encouraged the trial court to consider the jury’s request. Later at the same hearing, Pul-liam again asked the trial court to place Moore on probation and to make one of the conditions of his probation the payment of his child-support obligation. (Sentencing hearing, R. 13.)
The doctrine of invited error precludes a defendant from inviting error by his own conduct and then seeking to profit from that alleged error. See Mack v. State, 736 So.2d 664, 671 (Ala.Crim.App. 1999) (and cases cited therein). “A party cannot assume inconsistent positions in trial and in the appellate court and, as a general rule, will not be permitted to allege error in trial court proceedings that was invited by him or that was a natural consequence of his own actions.” Brooks v. State, 973 So.2d 380, 394 (Ala.Crim.App. 2007); Smith v. State, 745 So.2d 922 (Ala. Crim.App.1999). However, a defendant cannot consent to waive a jurisdictional defect. See Bradley v. State, 925 So.2d 232, 241 (Ala.2005). Thus, the question is whether the alleged error was jurisdictional.
The record reflects that Moore’s trial counsel specifically requested the trial court to make the payment of Moore’s child-support obligation a condition of his probation. The trial court stated during the sentencing hearing that it would do that, and it later entered a sentencing order sentencing Moore to 1 year in jail and then split that sentence and ordered Moore to serve 90 days, followed by 2 years on probation.2 The sentencing order also provided that Moore was to pay for the victim’s medical bills incurred as the result of Moore’s assault and that “[a]ll child support owing to victim shall be brought current by July 19, 2007.” The trial court also entered a probation order, which stated, in part:
“It is the order of the court that the probationer comply with the following conditions of probation:
[[Image here]]
“8. Support his/her dependents to the best of his/her ability.
[[Image here]]
“19. Other conditions of probation ordered by the court are as follows:
“... All child support to be caught up current by July 19, 2007.”
(C. 44.)
In this case, Moore was sentenced pursuant to the Split Sentence Act, at § 15-18-8, Ala.Code 1975. Section 15-18-8(d) provides, in pertinent part, that “[wjhile ... on probation and among the conditions thereof, the defendant may be required ... [t]o provide for the support of any persons for whose support he or she is legally responsible.”
In addition, § 15-22-52, Ala.Code 1975, provides as follows:
“The court shall determine and may at any time modify the conditions of probation and may include among them the following or any other conditions. *153Such conditions may provide that the probationer shall:
[[Image here]]
“(9) Support his dependents to the best of his ability.”
In Bowers v. State, 565 So.2d 1203 (Ala. Crim.App.1990), this Court, construing § 15-22-52 broadly, noted that the legislature intended the courts to have maximum flexibility to fashion the sentence most appropriate to the individual defendant. Sections 15-18-8 and 15-22-52 are clearly indicative of the legislature’s intent to place a great deal of discretionary authority in the trial court to establish the terms and conditions of an individual’s probation.
According to the above statutes and cases, the trial court did not lack jurisdiction to order Moore to pay his delinquent child support as a condition of his probation. Thus, the doctrine of invited error precludes Moore from obtaining relief on this claim.
For the foregoing reasons, Moore’s convictions and sentence are affirmed.
AFFIRMED.
McMILLAN, SHAW, and WISE, JJ„ concur. BASCHAB, P.J., concurs in part, concurs in the result in part, and concurs specially in part, with opinion. WELCH, J., concurs in part and dissents in part, with opinion.. Rule 803(4), Fed.R.Evid., excludes from the hearsay rule: '‘[s]tatements made for purposes of medical diagnosis or treatment and describing medical history, or past or present symptoms, pain, or sensations, or the inception or general character of tine cause or external source thereof insofar as reasonable pertinent to diagnosis or treatment.”
. The court stated: "I'm not going to try to calculate the child support, but I am going to put in my order of probation that the child support be brought current within six months." (R. 35-36.)