By Jessica Toonkel

(Reuters) - A Massachusetts judge presiding over a case hinging on Sumner Redstone's mental condition on Thursday peppered attorneys on both sides of the dispute with questions about the 93-year-old media mogul's state of mind and how he communicates with people.

Judge George Phelan decided, however, not to hear arguments about whether Redstone should be subject to a medical examination immediately, and did not rule on whether the case should continue in Massachusetts - or even if it should continue at all - leaving the legal tussle over Redstone's $40 billion media empire no closer to being resolved. "Obviously I have a lot of information to digest in just the motion to dismiss itself," Phelan said on Thursday after a hearing that lasted more than five hours. "It's going to take me a while to grasp all of that."

The hearing was the latest episode in the legal wrangle over the fate of Redstone's controlling stake in Viacom Inc <VIAB.O> and CBS Corp <CBS.N>, which has been playing out on both U.S. coasts over the past several months.

The main issue before Phelan on Thursday was whether Redstone knew what he was doing when he removed Viacom Chief Executive Philippe Dauman and Viacom board member George Abrams from the seven-person trust that will control Redstone's holdings when he dies or is incapacitated.

The trust, officially called the Sumner M. Redstone National Amusements Inc Trust, owns about 80 percent of Redstone's privately held movie theater company, National Amusements Inc, which in turn owns 80 percent of the voting rights in both Viacom and CBS.

After their removal from the trust, Dauman and Abrams claimed in a lawsuit in the Massachusetts court that Redstone suffers from dementia, impaired cognition, a slowness of mental processing, a loss of memory, apathy, depression and has been manipulated by his daughter, Shari Redstone. Sumner Redstone has denied that in court filings.

In an effort to shed light on the matter, Phelan asked attorneys at Thursday's hearing how Redstone communicated with his secretary, how his speech therapist understood what he was saying and whether she had expertise in doing so.

“Since October 2015, how does information get to Sumner Redstone ... who is providing it?” Phelan asked attorneys for Sumner and Shari Redstone. He asked if intermediaries were involved, and how Redstone's directions are conveyed to outside people.

The judge also asked if there was a medical test that could be used to gauge Redstone’s ability to make decisions about adding and removing members of his trust if the case goes to trial. The other issue in front of Phelan on Thursday was whether the case should be handled in Massachusetts, where National Amusements is based and where Redstone is from and lived for years, or in California, where he currently resides.

Redstone's attorneys said the case should be moved as most of the witnesses, including all of Redstone's nurses, were in California. Phelan noted that their testimony could be taken through affidavits.

The outcome of the Massachusetts court case, and who ends up with control over the trust, will have wide-ranging implications for Viacom and CBS shareholders and could result in changes at the top of both companies, possibly through mergers and acquisitions.

In May, Redstone defeated a similar mental competence lawsuit brought by an ex-girlfriend, Manuela Herzer, in a Los Angeles state court. That case had lasted several months before Redstone eventually stated his wishes under oath. Once he did, the judge quickly dismissed the case.

Phelan at one point seemed to question the California's judge's decision in that case and asked to see all of the depositions from both Herzer and Shari Redstone that were taken into account during that trial.

Phelan also asked to see the divorce agreement between Sumner Redstone and his ex-wife, Phyllis Redstone, through which the trust was created.

The result of the Massachusetts case also has implications for Viacom's board. Earlier this month, Redstone and National Amusements moved to oust five of Viacom's directors, including Dauman and lead independent director Frederic Salerno, asking a court in Delaware - the state where Viacom is incorporated - to rule that the changes were valid. That same day, Salerno fired back with is own lawsuit challenging the removal.

Last week, Judge Andre Bouchard of the Court of Chancery of Delaware said he planned to hold a hearing in July to listen to arguments about whether the move was valid, but indicated he hoped that the Massachusetts court would decide on Redstone's competence.

(Reporting By Jessica Toonkel; Editing by Bill Rigby)