
247 Ga. 548 (1981)
277 S.E.2d 655
BLALOCK
v.
BLALOCK.
37130.
Supreme Court of Georgia.
Decided April 30, 1981.
Turnage, Leavell & McDonald, James E. McDonald, Jr., for appellant.
Fred W. Minter, for appellee.
GREGORY, Justice.
The parties in this action were divorced in DeKalb County in July, 1974. The wife is now a resident of Charleston, South Carolina. The husband has remarried and resides in Madison County, Georgia. By agreement between the parties, incorporated into the divorce decree, custody of the couple's minor child was given to the wife with "reasonable rights of visitation" granted to the husband "at such time and place as the parties may agree." The agreement provided that the husband would be entitled to at least two weeks visitation with his son in the summer months, but left the dates to the determination of the parties.
In July, 1980 the wife filed a contempt action in DeKalb County against the husband for failure to return the child to her following visitation. The husband answered that the wife had asked him to care for the child because she could no longer control him, that the child's problems had subsided while in the husband's care, and that continued "visitation" with the husband would be in the best interest of the child. The husband also filed a motion for modification of visitation rights, requesting that the child be allowed "to visit [with him] during the school term and attend school" and "to visit with [the husband] at other reasonable times than the school term."
At the hearing on the contempt action, evidence was presented which showed that, prior to the visit with the husband out of which this proceeding arose, the eight-year-old child had performed poorly in school and had been under psychiatric care for emotional problems. The child's psychiatrist recommended to the wife that the child be permitted to spend more time with his father. On April 19, 1980 the wife requested that the husband take the child for an *549 extended visit. The parties disagree about the length of time that the wife asked the husband to keep the child. When the husband refused the wife's request to return the child to her, she initiated this contempt proceeding. The evidence indicated that the child has made considerable progress academically during his visit with his father. After speaking at length with the child the trial court entered an order which denied the wife's application for attachment for contempt. The order further stated "[the husband's] motion for modification of visitation rights and custody is granted." The order then purported to grant visitation rights to the wife from August 13, 1980 to August 21, 1980, as well as allowing her to visit with the child during the Thanksgiving holidays of even years and during the Christmas holidays of odd years. The order also states that the wife has visitation rights for two weeks during each summer, provided she gives 30 days notice to the husband.
We granted the wife's application to appeal. She enumerates two errors made by the trial court.
(1) The wife first argues that the trial court erred in denying her motion to dismiss husband's motion for modification of visitation rights, as the husband's motion is a counterclaim, and under Steelman v. Fowler, 234 Ga. 706 (217 SE2d 285) (1975), she is exempt from service of process in another suit while in attendance upon the contempt proceeding.
In Steelman, the wife, a nonresident, filed a contempt action against her former husband in Fulton County for failure to allow visitation privileges. The former husband filed a complaint for change in condition with respect to visitation privileges. While in the judge's chambers awaiting appearance on her motion in the contempt action, the wife was served with process in the husband's suit. This court held that the trial court erred in failing to grant the wife's motion to quash the change of custody action because of insufficiency of service of process. Nothing that "[a] petition for contempt and a petition for change of custody are separate proceedings" we stated "[t]he law seems to be that a suitor or a witness in attendance upon the trial of any case in court, is privileged from arrest under any civil process, and is exempted from the service of any writ or summons upon him or them while in attendance upon such court, or in going to or returning therefrom." Steelman at 707.
Prior to 1976 a motion for modification of visitation rights was also a proceeding separate from a contempt action. A motion for modification of visitation rights could not be made in a contempt proceeding. Rather, modification of visitation rights had to "be accomplished through new proceedings" based on a change of circumstances affecting the welfare of the minor children. Henderson *550 v. Henderson, 231 Ga. 577, 578 (203 SE2d 183) (1974).
In 1976 the General Assembly enacted Code Ann. § 30-127. Section (b) of this provision provides in part: "In any case in which a judgment has been entered awarding the custody of a minor, on the motion of any party, or on the motion of the court, that portion of the judgment effecting visitation rights between the parties and their minor children may be subject to review and modification or alteration ..."
We recognized in Sampson v. Sampson, 240 Ga. 118, 119 (239 SE2d 519) (1977) that, with the enactment of Code Ann. § 30-127 (b), "a new proceeding based upon evidence showing a change in circumstances affecting the interest and welfare of the minor children is now not the only way visitation rights may be modified." Visitation rights may now be modified on motion of either party or on motion of the trial judge in a contempt action. Sampson, supra. Such a motion is not a new action, but is simply a motion in the original case. Thus, the safeguards set out in Steelman, supra, to insulate a party in attendance upon the trial of a case from service of process in a new action are not applicable where a party makes a motion for modification of visitation rights in a contempt proceeding.
In this case the husband could properly make a motion for modification of visitation rights in a contempt proceeding brought by the wife. The trial court did not err in denying the wife's motion to dismiss.
(2) Next, the wife argues that the trial court was without authority to change the custody of the minor child to the husband, as the issue of custody was not before the trial court.
The trial court's order stated that the husband's "motion for modification of visitation rights and custody is granted." The order then sets forth detailed visitation rights for the wife. No "motion for modification of ... custody" appears in the record. While there is nothing in the record to indicate that the husband sought a change of custody in this contempt action, the most reasonable construction of the trial court's order is that custody of the child was changed from the wife to the husband.
In enacting Code Ann. § 30-127 the legislature did not provide that a change of custody could be made by motion. A petition for change of custody must still "be accomplished through new proceedings." Henderson, supra, at 578; Steelman, supra. Had the husband made a motion or counterclaim for change of custody in the contempt action brought by the wife, it would have been ineffective to authorize the trial court to change the custody of the child. Had he filed a petition for change of custody in a separate suit against the wife, she would have been protected, under Steelman, supra, from *551 service of process in the new suit while she was in attendance of the contempt proceeding. Thus, the court would not have been authorized to change the custody of the child in this case even had the husband sought a change. Nor are we aware of any authority which would permit the trial court to change the custody of the minor child, sua sponte.
Therefore, while we conclude that the trial court did not err in denying the wife's application for attachment for contempt, we find that the trial court erred in changing the custody of the child from the wife to the husband.
Judgment affirmed in part; reversed in part. All the Justices concur.
