The defendant in error moves to dismiss the writ of error on the grounds that: (1) The plaintiff in error is seeking to bring separate and distinct cases, which have not been consolidated, to this court by one bill of exceptions. (2) No final judgment was rendered in the case of H. T. McGee v. Della Jane Turner, being case No. MD 5326 in Gwinnett Superior Court.
The motion to dismiss the writ of error is without merit. The judge of the superior court treated the first pleading filed by Della Jane Turner as a separate cause of action and recited in the final judgment assigned as error in the bill of exceptions that it was consolidated with the habeas corpus case.
Where, as in the present case, there is but one common point of litigation between the parties (custody of their child), separate actions of the father and the mother are properly consolidated. Code § 3-112; White v. Interstate Building & Loan Assn., 106 Ga. 146 (32 SE 26); People’s Nat. Bank of Shelbyville, Tenn. v. Cleveland, 117 Ga. 908 (44 SE 20); Spinks v. LaGrange Banking Ac. Co., 160 Ga. 705, 714 (129 SE 31); Pope v. U. S. Fidelity &c. Co., 193 Ga. 769 (20 SE2d 13); West View Corp. v. Thunderbolt Yacht Basin, 208 Ga. 93 (65 SE2d 167, 25 ALR2d 878); Worley v. Gaston, 210 Ga. 350 (80 SE2d 304).
The bill of exceptions recites that the consolidation was made on the motion of counsel for the father. “A party must be held bound by a ruling which he invoked . . .” Butler v. Tifton &c. Ry. Co., 121 Ga. 817 (5) (49 SE 763); Poss v. Norris, 197 Ga. 513, 517 (29 SE2d 705). “One cannot complain of a judgment, order, or ruling that his own procedure or conduct procured or aided in causing.” Bennett v. Bennett, 210 Ga. 721 (2) (82 SE2d 653).
The case of Stephenson v. Futch, 213 Ga. 247 (98 SE2d 374), and similar cases, where separate judgments were rendered, have no application to the facts of this case.
*773The contention of counsel that no judgment was rendered by the court in case No. MD 5326 (the father’s habeas corpus petition) is completely refuted by the order of the court set out in our statement of facts.
At no time, in any manner known to the law, did the Judge of the Superior Court of Gwinnett County acquire any jurisdiction of Della Jane Turner under the original writ of habeas corpus issued on July 5, 1961. The lack of jurisdiction in the Superior Court of Gwinnett County was evident upon the face of the habeas corpus petition, and the judge of the superior court did not acquire jurisdiction of her by any subsequent proceeding.
It has been the law of this State since the passage of the Judiciary Act of February 16, 1799, that a witness shall not be arrested on any civil process while going to, returning from, or attending any court in this State. The provisions of the Judiciary Act of 1799 now appear as § 38-1506 of the official Code of this State, which provides as follows: “A witness shall not be arrested on any civil process while going to or returning from and attending on any court, and an officer who shall hold him imprisoned after seeing his subpoena or being satisfied of the fact shall be liable for a false imprisonment.”
The provisions of the above Code section have been stated and applied in many decisions of this court. In Thornton v. American Writing Machine Co., 83 Ga. 288, 290 (9 SE 679, 20 ASR 320), it was stated: “If a suitor or witness is arrested or if civil process is served upon him while thus in attendance on the court, the court, upon application made in proper time, will order his discharge from arrest, or will set aside the service of the civil process.” See also Henegar v. Spangler, 29 Ga. 217, 218; King v. Phillips, 70 Ga. 409; Fidelity & Casualty Co. v. Everett, 97 Ga. 787 (25 SE 734); Rogers v. Rogers, 138 Ga. 803, 804 (76 SE 48); Vaughn v. Boyd, 142 Ga. 230 (82 SE 576, LRA 1915A 694); Lomax v. Lomax, 176 Ga. 605 (168 SE 863). The right of a witness in a civil action to freedom from arrest is not a rule peculiar to this State. It is the general rule in this country. See 6 C.J.S. 642, § 29 (k); 4 Am. Jur. 68, § 101.
Della Jane Turner never conceded that the Superior Court *774of Gwinnett County had jurisdiction of the cause, and she did not wait until final judgment had been recorded against her to invoke the want of jurisdiction of the court. The evidence produced before the judge of the superior court clearly established the illegality of the service of the habeas corpus petition upon her, and the illegality of her arrest at that time.
We need look no further than the testimony of Daniel C. Cole, the Sheriff of Gwinnett County, in order to establish an illegal and unauthorized denial of the right of Della Jane Turner to freedom from arrest under the writ of habeas corpus. This testimony was delivered on the hearing before the judge of the superior court on August 1, 1961, and was in part as follows: “My name is Daniel C. Cole. I am Sheriff of Gwinnett County. On the 5th day of July this year, I served a paper on Mrs. Della Jane Turner McGee at approximately 12:50. The paper was a habeas corpus proceedings for her to produce the baby. I served the paper on Mrs. McGee in the hall of the Gwinnett County Courthouse. Mr. Duncan gave me the paper to serve. I asked her if she had the baby or if she would tell me where the baby was that I might pick it up and bring it before the court and she said she would tell me where the baby was at when she had her day in court, and so I brought her upstairs to be brought before Judge Pittard at that time and the judge was busy and we had to wait before we could bring her in before the judge. There was a hearing set for 1:00 o’clock before Judge Buchanan, Justice of the Peace, on a warrant taken out against Mrs. King, attorney for Mrs. McGee, and she was allowed to go in and attend that hearing before she was brought in before this court. She was a witness in that hearing. I stayed in the J. P. Courtroom, the whole time she testified. My office was familiar with the fact that Mrs. King was going to be appearing on July 5th at a commitment hearing. I knew on July the 3rd that she was to appear at a commitment hearing on July the 5th. When I handed the papers to Mrs. Turner McGee on July the 5th, she was then under arrest from that time on.” (Italics ours.)
On cross-examination the sheriff stated: “When I served Mrs. Turner with the habeas corpus proceedings, she did not produce any subpoena to me or tell me that she was here under sub*775poena. She did not complain to me about serving her because she was in Gwinnett County as a witness. I don’t remember if she had any other papers in her hand when I served her. I do not recall whether or not she was reading or was holding a long, legal paper like this in her hand at that time. I was more interested in getting the papers I had in her hands. I had Mrs. Turner in my custody in jail about nine days. She refused every day she was there to reveal where her child was.” (Italics ours.)
It was not essential that Della Jane Turner show any subpoena to the sheriff. The law does not require such proof. All that is required is that the officer be “satisfied of the fact.” Code § 38-1506. The sheriff testified positively and unequivocally that Della Jane Turner was a witness in the case against her attorney, Mrs. King, and that, “My office was familiar with the fact that Mrs. King was going to be appearing on July 5th at a commitment hearing.” The sheriff’s positive and unequivocal testimony that Della Jane Turner “was a witness in that hearing,” and his further testimony, “When I handed the papers to Mrs. Turner McGee on July the 5th she was then under arrest from that time on,” leave no room for speculation that the sheriff may have acted innocently, or that he may have acted without notice that she was a witness.
The sheriff further testified that he had had a lot of trouble and publicity, that he allowed Della Jane Turner to make a telephone call, and that he “carried her to Atlanta and when we got to Atlanta, the baby was in her apartment.” From further redirect examination it appears that the sheriff not only knew that Della Jane Turner was a resident of Fulton County, Georgia, but that he knew her actual address, having had a warrant for her arrest for kidnaping. In this connection he testified: “I sent a copy to the Atlanta Police Department because I understood that she was supposed to be living in Atlanta. I did not send it any place except Atlanta. I don’t recall what address was on the warrant I received. I think it was 950 St. Charles Avenue in Atlanta.” (Italics ours.)
The justice of the peace who had issued the warrant against Mrs. Della Jane Turner McGee testified that he had put her *776address on the warrant to help the sheriff, that, “I put down 950 St. Charles Avenue, N. E.” H. T. McGee testified at the hearing: “I have visited with her in her apartment in Atlanta on approximately one occasion. Her apartment is 950 St. Charles.”
From the uncontradicted testimony of the sheriff, Della Jane Turner’s civil rights under Code § 38-1506 were violated, and the judge of the superior court was fully apprised that his court was without jurisdiction in the premises, and being so advised, it was the duty of the court when such fact was made to appear to dismiss the proceedings against her. “If the court in which a case is brought, has no jurisdiction to try the same, it will be dismissed whenever the court is apprised of such fact.” Powell v. Cheshire, 70 Ga. 357 (1a) (48 AR 572); Watts v. Watts, 130 Ga. 683 (61 SE 593); Cohen v. Cohen, 209 Ga. 459 (74 SE2d 95).
The trial court in the present case, however, did not have to wait until the hearing on August 1, and until after the illegal and unauthorized incarceration of Della Jane Turner in the common jail for the period of nine days, as testified to by the sheriff, to ascertain that he had no jurisdiction to issue the habeas corpus writ in the first instance. It is alleged in paragraph 4 of the petition that on June 301, 1961, Della Jane Turner came to the City of Lawrenceville “and without lawful authority, stole and absconded with said child.” The petition nowhere alleges that she is residing in Gwinnett County and within the jurisdiction of the court.
It is alleged in paragraph 6 of the petition that: “This petitioner is unable to determine where the said Della Jane Turner is concealing, detaining, and holding said child, but shows that the said Della Jane Turner is now in Gwinnett County, Georgia, herself and in and under the jurisdiction of this court.” If this statement be accepted as alleged, then the petition for habeas corpus must have been prepared, issued, and served after Della Jane Turner went to the courthouse in Gwinnett County to testify as a witness in the case of her attorney, charged with a crime. It should be remembered that the applicant, the father, testified at the hearing on August 1 that he *777knew that Della Jane Turner resided at 950 St. Charles, and that he had visited her there.
“A judge of the superior court sitting in his circuit has no authority to grant a writ of habeas corpus, unless the illegal detention exists in a county of that circuit.” Girtman v. Girtman, 191 Ga. 173 (4) (11 SE2d 782); Crowell v. Crowell, 190 Ga. 501 (9 SE2d 628); Morrison v. Morrison, 212 Ga. 48 (90 SE2d 402); Dutton v. Freeman, 213 Ga. 445, 449 (99 SE2d 204); Brown v. Goodloe, 215 Ga. 755 (113 SE2d 393).
In order for a petition to state a cause of .action for the relief sought, essential jurisdictional facts must be averred. Coney v. Horne, 93 Ga. 723 (20 SE 213); Weatherly v. Southern Cooperative Foundry Co., 111 Ga. 826 (36 SE 59); Myers v. Pearce, 102 Ga. App. 235, 240 (115 SE2d 842). Generally, pleas to the jurisdiction must be pleaded specially, “unless a want of jurisdiction shall appear on the face of the proceedings in which case it may be taken advantage of on motion.” Code § 81-501. In her pleading filed on July 5, Della Jane Turner alleged that she “is a resident of this State and of Fulton County,” and in her subsequent motion to dismiss for lack of jurisdiction, filed on July 11, she alleged that she “is a resident of Fulton County and that the Superior Court of Fulton County has exclusive jurisdiction.” This motion was denied and dismissed by the trial judge without any hearing. Assuming, but not holding, that this motion was subject to demurrer, it was sufficient to put the court on notice of the lack of jurisdiction of the court, which appeared on the face of the petition for habeas corpus.
Admissions obtained by constraint or duress are not proper evidence. Code § 38-408. Under the undisputed testimony of the sheriff, he was illegally restraining Della Jane Turner of her liberty at the time she filed her first pleading, in which she asked that the rights of the father to have custody of the child be inquired into, and that rule nisi issue. If the pleading should properly be considered a separate action, it could not confer jurisdiction on the court, since at the time her pleading was filed, Della Jane Turner had been denied her right of freedom from arrest as a witness and was being illegally restrained of her liberty in the common jail of Gwinnett County. Any pleading *778filed by her under such duress could not confer jurisdiction on a court which otherwise had no jurisdiction. The last custody and possession of the child (however illegally obtained) was by Della Jane Turner in Fulton County.
Jurisdiction of the subject matter “can not be conferred by agreement or consent, or be waived or ‘based on an estoppel of a party to deny that it exists.’ Parker v. Travelers Insurance Co., 174 Ga. 525, 529 (163 SE 159); . . .” Langston v. Nash, 192 Ga. 427, 429 (15 SE2d 481); Rainey v. McRae, 14 Ga. 589 (60 AD 660); Kantzipper v. Kantzipper, 179 Ga. 850 (177 SE 679); Mathis v. Rowland, 208 Ga. 571 (67 SE2d 760); Sweatman v. Roberts, 213 Ga. 112 (97 SE2d 320).
However wrong Della Jane Turner’s conduct may have been in removing her child from Gwinnett County to Fulton County without authority, she is the mother of the child and was living in Fulton County where she was caring for her child. After her unlawful arrest and incarceration in the common jail of Gwinnett County for nine days, the Sheriff of Gwinnett County brought her to Fulton County and removed the child from her apartment. Such duress and denial of her civil rights demand restoration of the child by the sheriff to her at her apartment in Fulton County.
Direction is given (see Code § 6-1610) that the judge of the superior court enter a judgment dismissing the void habeas corpus proceedings, and that the sheriff be directed to take custody of the child and deliver her to Della Jane Turner at her apartment in Fulton County, Georgia, from which the sheriff had unlawfully removed her.
Judgment reversed with directions.
All the Justices concur, except Mobley and Quillian, JJ., who dissent.