
1 So.3d 145 (2008)
Jeffrey Scott MOORE
v.
CITY OF LEEDS.
CR-06-0760.
Court of Criminal Appeals of Alabama.
February 1, 2008.
Rehearing Denied April 11, 2008.
*146 Maxwell H. Pulliam, Jr., Birmingham, for appellant.
Susan J. Walker, Birmingham, for appellee.
PER CURIAM.
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-11-8(a)(1)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 *147 arrearage 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. Huddleston said that she had blood on her face. A man got out of the SUV on the driver's side and walked toward Huddleston. 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. *148 Kelly 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 "[statements 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 *149 under 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.' Renville, 779 F.2d at 436. If the child is *150 aware 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.


*151 II.
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 Coburn 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 hearing, *152 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, Pulliam 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:
"....
"8. Support his/her dependents to the best of his/her ability.
"....
"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 "[w]hile... 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. *153 Such conditions may provide that the probationer shall:
"....
"(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.
BASCHAB, Presiding Judge, concurring in part, concurring in result in part, and concurring specially in part.
I concur in the result as to Part I of the majority opinion, concur specially as to Part II of the majority opinion, and concur as to Part III of the majority opinion.
With regard to Part I of the majority opinion, I do not agree with the majority's reliance on the reasoning in Ex parte C.L.Y., In re Moore, and United States v. Joe because those cases involved statements by victims of sexual abuse. However, I do agree with the majority that the victim's statement in this case was admissible pursuant to Rule 803(4), Ala. R. Evid., and Biles. I also note that McCoy's testimony was merely cumulative to the victim's trial testimony. Therefore, I concur in the result as to Part I of the majority opinion.
With regard to Part II of the majority opinion, I question whether attempting to "bargain away" criminal charges as part of a divorce settlement is legal or ethical. A criminal case is brought in the name of the State, and it is not the province of the victim to dictate the course of its prosecution. Although the victim is a critical participant in the criminal justice process, in the end, the case is not the victim's to dismiss. Leveraging the resolution of criminal proceedings as a quid pro quo for settling civil matters has the potential to subvert the criminal justice system and harm those it is designed to protect. The potential for such harm is exacerbated in domestic violence cases. Therefore, I write specially to encourage attorneys not to engage in this highly questionable practice.
WELCH, Judge, concurring in part and dissenting in part.
I agree with the majority's opinion insofar as it affirms Jeffrey Scott Moore's conviction. However, as discussed below, because the trial court did not have jurisdiction to order Moore to satisfy a civil judgment as part of his sentence in an unrelated criminal case or as a condition of his probation in the criminal case, I respectfully dissent from the opinion insofar as it affirms the sentence imposed in this case.
*154 On appeal, Moore 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 the divorce judgment, which also established child custody and support matters. 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.
From the record, it appears that the trial court's decision to order Moore to pay the child-support arrearage came about because of a request made by Moore's own trial counsel. At Moore's sentencing hearing, Maxwell Pulliam, who was Moore's attorney both at trial and on appeal, represented to the trial court that the forewoman of the jury told him that the jury wanted to recommend that Moore not receive prison time and suggested that instead, Moore be sentenced to receive counseling, that he be required to pay Kelly's medical expenses, and that he be ordered to catch up on his child-support obligation, among other things. (Sentencing hearing, R. 11.) Pulliam then encouraged the trial court to consider the jury's request, even though it was not bound to do so. Later in the same hearing, Pulliam 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.)
Ordinarily, the doctrine of invited error would preclude Moore from alleging error as to this issue. Under the doctrine of invited error, a defendant cannot voluntarily invite error by his own conduct and then seek to profit from that alleged error. 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).
Nonetheless, one cannot consent to lack of subject-matter jurisdiction or invite a jurisdictional error. Bradley v. State, 925 So.2d 232, 241 (Ala.2005); Flannigan v. Jordan, 871 So.2d 767, 768 (Ala.2003). "A sentence that exceeds the maximum allowed by law is an illegal sentence affecting the trial court's jurisdiction." Wallace v. State, 959 So.2d 1161, 1165 (Ala.Crim. App.2006). Therefore, if Moore's sentence exceeded the statutory punishment for the offenses for which he was convicted, the doctrine of invited error cannot properly be invoked to affirm that sentence.
In this case, Moore was before the court on charges of domestic violence in the third degree, a Class A misdemeanor, § 13A-6-132(a), Ala.Code 1975, and harassment and harassing communications, both of which are Class C misdemeanors, § 13A-11-8(a)(3) and § 13A-11-8(b)(2), respectively. A Class A misdemeanor is punishable by not more than one year in jail, § 13A-5-7(a)(1), and a fine of not more than $2,000. § 13A-5-12(a)(1). A Class C misdemeanor is punishable by not more than three months in jail, § 13A-5-7(a)(3), and a fine of not more than $500. § 13A-5-7(a)(3).[3]
*155 A criminal proceeding is brought before the court either by an indictment or a complaint. Rule 2.1, Ala. R.Crim. P. The matter of Moore's alleged child-support arrearage was not a charge in the indictment against Moore, and it was not a basis for Moore's convictions for domestic violence in the third degree, harassment, and harassing communications. Thus, in requiring Moore to pay his past-due child-support obligation by a date certain as part of his sentence, the trial court exceeded the scope of the statutory punishments allowed for the offenses committed.
The majority states that a court can order a probationer to support his dependents to the best of his ability, as authorized by § 15-22-52(9), Ala.Code 1975. The majority opinion also cites Bowers v. State, 565 So.2d 1203 (Ala.Crim.App.1990), for the proposition that the Legislature intended to grant trial courts a great deal of discretionary authority to establish the terms of an individual's probation. I recognize those statements of the law and agree that requiring a probationer to support his dependents as a condition of probation is laudable.
However, in this case, the trial court went beyond merely ordering Moore to support his dependents to the best of his ability. Here, the trial court ordered Moore to pay his child-support arrearage in full by a certain date as a condition of his probation in an unrelated criminal case. The Supreme Court has held that the term "child-support obligation" as that term is contemplated by Rule 32(B)(6), Ala. R. Jud. Admin. (and thus, at issue here), does not encompass a "child-support arrearage." Ex parte State ex rel. Daw, 786 So.2d 1134, 1137 (Ala.2000); see also Sheeley v. Chapman, 953 So.2d 1252 (Ala.Civ. App.2006).
"A child-support obligation is based on the court's expectation that the obligor will pay in accordance with the court's established schedule. A delinquent child-support obligation, however, receives different treatment. It is clear that `child support payments become final judgments on the day they are due.' Ex parte State ex rel. Lamon, 702 So.2d 449, 450 (Ala.1997); see also State v. Handley, 628 So.2d 726, 727 (Ala.Civ. App.1993); Grogan v. Grogan, 608 So.2d 397, 398 (Ala.Civ.App.1992); Hardy v. Hardy, 600 So.2d 1013, 1015 (Ala.Civ. App.1992); Foster v. Foster, 571 So.2d 1219, 1220 (Ala.Civ.App.1990); and O'Neal v. O'Neal, 532 So.2d 649, 650 (Ala.Civ.App.1988). Thus, the character of the obligation changes once it becomes delinquent, because the fact of the delinquency causes the party to whom the debt is owed to become a judgment creditor, a creditor who may then pursue the typical means of collection that are available to the holder of any judgment. Ex parte State ex rel. Lamon, 702 So.2d at 450. Therefore, a delinquent payment constitutes a legal liability of the obligor, while a child-support obligation is only an expectation that the obligor will make a payment in the future."
Daw, 786 So.2d at 1137.
The law is settled that imprisonment for contempt should not be imposed where the failure to pay child-support arrearage is due to an inability to comply with the order. See, e.g., T.L.D. v. C.G., 849 So.2d 200 (Ala.Civ.App.2002); Falkner v. State ex rel. Falkner, 769 So.2d 933 (Ala.Civ. App.2000); Vinson v. State ex rel. Barron, 724 So.2d 550 (Ala.Civ.App.1998); and Muery v. Muery, 46 Ala.App. 617, 247 So.2d 123, cert. denied, 287 Ala. 737, 247 So.2d 128 (1971). As this Court recognized in Dixon v. State, 920 So.2d 1122, 1126 (Ala.Crim.App.2005):

*156 "Nowhere in our caselaw, statutes, or rules do we allow the imprisonment of a civil debtor because he or she is unable to pay the debt. Nowhere in our caselaw, statutes, or rules will a case of constructive contempt lie for the inability to pay a debt owed to a creditor or, in this case, a victim. Rather, a suit is commenced, a judgment is obtained and executed, and a lien is imposed or wages are garnished. That is, the victim takes advantage of his or her civil remedies; the court does not act as an enforcer and compel payment to the victim through the imposition of a criminal penalty upon the indigent debtor."
If, under our system of laws, imprisonment cannot be countenanced for an inability to pay child support, then it stands to reason that it cannot be an appropriate condition of probation to require a criminal defendant to pay a civil judgment, such as a child-support arrearage, in an unrelated criminal matter, i.e., a matter which is not considered a parallel proceeding. My research has revealed no statute, case law, rule or other authority that would allow a trial court to impose as a condition of probation in a criminal matter the satisfaction of a civil judgment in an unrelated matter. Indeed, to allow such a requirement as a condition to probation seems anathema to American jurisprudence.
In this case, the payment of child-support arrearage cannot be considered a form of restitution for Moore's conviction for domestic violence and harassment. Whether Moore was in arrears on his child-support obligation was not a matter before the trial court. There has been no finding of contempt against Moore for his alleged failure to pay child support. In ordering Moore to pay his child-support arrearage as a condition of his probation in this criminal matter, the trial court in Moore's criminal case is becoming entangled in a civil matter that is not before it.[4] The trial court's sentence, requiring Moore to pay what is in fact a civil judgment in an unrelated case as a condition of his probation in this criminal case, constitutes an illegal sentence.
An illegal sentence exceeds the jurisdiction of the trial court and is void. Wallace, 959 So.2d at 1165; Rogers v. State, 728 So.2d 690, 691 (Ala.Crim.App.1998). Because the trial court did not have the jurisdiction to order Moore to pay his child-support arrearage as part of his sentence in this criminal case, that portion of the judgment ordering such payment is void.
In reaching this conclusion, I want it understood that I do not condone the apparent manipulation of Moore's sentence by his attorney. In ordering Moore to pay his child-support arrearage as part of his sentence in this case, the trial court was acting on the recommendation of Moore's attorneythe same attorney who is now challenging the very sentence he recommended. A defendant cannot invite jurisdictional error; however, he can, by his actions, waive his right to be free from double jeopardy. Bradley v. State, 925 So.2d 232, 241 (Ala.2005). The record in this case shows that Moore received the very sentence his attorney asked of the trial court but which he now claims was error. That Moore was only ordered to spend 90 days in jail for his convictions appears to have been brought about in consideration of the fact that the court expected Moore to pay his past-due child-support obligation.
*157 For the reasons set forth above, I would reverse Moore's sentence and remand this cause, directing the trial court to resentence Moore without consideration of his child-support arrearage. Therefore, I must respectfully dissent from the majority opinion insofar as it affirms Moore's sentence.
NOTES
[1]  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 the cause or external source thereof insofar as reasonable pertinent to diagnosis or treatment."
[2]  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.)
[3]  Misdemeanors may also be subject to fines of any amount not exceeding double the pecuniary gain to the defendant or loss to the victim caused by the commission of the offense. § 13A-5-12(a)(4). A court may conduct a hearing on the amount of such loss to the victim, which, in this case, were the medical bills Kelly accrued as a result of Moore's assault upon her.
[4]  Further, we note that Act No. 388, Alabama Acts 1976, § 1 (amending § 6-118 of the Unified Courts Act), codified at § 12-17-70, Ala. Code 1975, authorizes a domestic-relations division for all circuits of this state.
