A former star of “The Real Housewives of Orange County” and her ex-husband testified Wednesday in their son’s attempted-murder case that they discussed legal strategies with him during phone conversations that they didn’t know were recorded and shared with law enforcement.

Joshua Waring, 29, who as a teenager appeared on the Bravo reality TV show, is facing three counts of attempted murder and other felony and misdemeanor charges in connection with a shooting at a former sober-living home in Costa Mesa in June 2016. He could face multiple life prison sentences if convicted.

His mother, Lauri Peterson, and father, Phillip Waring, took the stand during a hearing in Orange County Superior Court that aimed to determine whether recording the calls violated Joshua Waring’s right to a fair trial.

Defense attorney Joel Garson requested in January that Superior Court Judge Jonathan Fish dismiss the charges on the basis that law enforcement inappropriately monitored and recorded Waring’s phone calls in jail while he was representing himself in the case.

Information gleaned from the confidential calls was provided to prosecutors, Garson said.

“These actions by the prosecution team constitute outrageous government conduct,” he wrote in his January motion.

Peterson, a cast member on “The Real Housewives of Orange County” from 2006 to 2008, testified that she believed the calls with her son, in which they discussed defense strategies and questions to ask during court hearings, were not being recorded.

Deputy District Attorney John Maxfield said Waring’s parents should have been aware of the recording policy, saying a message played at the onset of phone calls from jail notes that the conversations are recorded.

Peterson said her understanding was that Waring was entitled to non-monitored phone calls while he represented himself in the case.

“I honestly had belief and trust the phone calls were not being monitored,” she said.

Phillip Waring also testified that he discussed strategy for his son’s defense during several phone calls.

“I assumed the Sheriff’s Department would … respect their rights and not record phone calls,” Phillip Waring said.

Garson says Joshua Waring was being recorded from June 25, 2016, to at least Feb. 8, 2017. Waring was representing himself for about a month in 2016.

Garson claims the recordings were done “in direct violation of a Superior Court order” that granted Waring “unmonitored collect phone calls.”

However, Maxfield wrote in a motion that recording the calls was not “outrageous,” as Waring had no reason to believe his phone conversations wouldn’t be monitored.

Waring was required to request unmonitored calls if he wanted them, Maxfield wrote.

“By not requesting access to those calls, he has no one to blame but himself for the recording of these phone conversations,” Maxfield wrote. “The Sheriff’s Department is not a mind reader.”

Fish has not ruled on the motion to dismiss the charges. Attorneys are expected to appear in court next month to question additional witnesses in the matter.

However, Fish ruled Wednesday that the Orange County Jail may not monitor any legal phone calls between Waring and Garson. He also said sheriff’s deputies are prohibited from reading Waring’s legal mail.

Waring was arrested June 20, 2016, hours after a man identified only as Daniel L. was seriously injured in a shooting in the 2900 block of Babb Street in Costa Mesa.

Witnesses told police that Waring had left the house, which was described as a “drug crash pad,” after a confrontation with a resident but returned around 2:30 a.m. June 20 in a BMW X3 that belonged to his girlfriend. Shots were fired at three people outside, authorities said.

hannah.fry@latimes.com

Twitter: @HannahFryTCN