With key court dates approaching, negotiations to bring an end to the bitter struggle at the top of Viacom have taken on new urgency in the past week, according to sources familiar with the situation.

Viacom chairman-CEO Philippe Dauman has been in a legal standoff with the Redstone family that controls the media conglom for nearly three months. People say talks between Dauman and National Amusements Inc., the holding company that owns Sumner Redstone’s controlling interests in Viacom and CBS Corp., are progressing toward an agreement for Dauman to step down. He would be replaced in the CEO role at least in the short term by his longtime No. 2, Viacom chief operating officer Tom Dooley.

Dauman is said to be negotiating an exit package worth about $85 million. The discussions are also focused on laying out a timetable for replacing five members of Viacom’s 11-member board of directors, including Dauman, an overhaul that National Amusements initiated in June. With the prospect of the Redstone vs. Dauman war coming to a close, speculation is turning to the long-term plan to reinvigorate Viacom and whether or not that will include an effort to reunite the company with CBS Corp. There are also rumblings that CBS chief Leslie Moonves will eventually have oversight over both companies although there are many hurdles that Viacom has overcome before that could possibly happen.

A big catalyst for the talks is the approach of the Aug. 26 hearing in a Massachusetts probate court on whether Redstone should submit to a mental competency test in connection with Dauman’s legal challenge to the recent moves by the 93-year-old billionaire. As one source observed, the arguments in that hearing “won’t be pretty,” which may have been a spur for the Redstone camp to accelerate settlement talks with Dauman. Lawyers have also been exchanging options this week to set a date for a deposition of Redstone. The progression of the discovery process could lead to revelations that support Dauman’s claim that Sumner Redstone’s recent moves have been dictated by his daughter, Shari Redstone.

Other sources close to the situation emphasized that the trial scheduled to begin Sept. 19 would also be a challenging process for Dauman. The defense would lay out in detail the reasons why Redstone wants him replaced. The company’s most recent earnings report, issued Aug. 4, offered a dismal picture of its declining fortunes and diminished status of key assets. The share price is down nearly 50% over the past two years and its mounting debt has put it at risk of a credit downgrade by Moody’s Investor Service.

From both sides, sources say, there’s also growing desire to end what has become a state of paralysis at Viacom. Big corporate decisions and strategic moves have been in limbo while the controlling shareholder wages a very public war of words with the CEO and nearly half of the board.

Reps for Sumner and Shari Redstone, Viacom and National Amusements declined to comment.

The fight for control of Viacom erupted into a legal battle and PR nightmare in May when Sumner Redstone ousted Dauman and another longtime attorney and confidant, George Abrams, from the board of National Amusements and from the trust that will inherit the Viacom and CBS stakes after Redstone’s death. Dauman and Abrams sued in Massachusetts (where the trust is incorporated) to block those moves. A month later, National Amusements moved to replace the five board members, including lead independent director Frederic Salerno. That sparked a lawsuit in Delaware filed on behalf of the directors by Salerno. In both cases, the Viacom incumbents argue that Sumner Redstone has been unduly influenced by Shari Redstone and that the 93-year-old billionaire does not have the mental capacity to understand the decisions being made in his name. The Redstone clan has strongly disputed that characterization.

As the sides move toward a settlement, the focus in the Redstone camp is turning to the question of what’s next for the company. The choice of Dooley as CEO is a surprise to outside observers. Some had speculated that Viacom’s top international exec, Bob Bakish, would be recruited for an interim role. But Dooley exec has a clause in his most recent employment contract, finalized in March, that calls for him to receive a $63 million payout if Dauman is fired and he is not offered the CEO post.

The addition of the five new board members — Kenneth Lerer chairman of Buzzfeed; former Sony exec Nicole Seligman, former Discovery CEO Judith McHale; Bank of America alum Thomas J. May and former DreamWorks COO Ronald Nelson – will bring a new depth of experience and industry savvy to the board and surely prompt a strategic review of all Viacom operations worldwide. In that scenario, the consistency of institutional knowledge that Dooley would make sense while the new leaders sort out options for the future. “A CEO serves at the discretion of the board,” one source noted. Over time, it is expected that Viacom will see more turnover of board members.

Shari Redstone is known to be intimately involved in steering National Amusements’ moves to reshape the management picture at Viacom. But what if any long-term role she intends to play is unclear. Sources close to the younger Redstone have long maintained that she does not want to run the company per se but has been distressed by its performance in recent years.

Among the big challenges facing Viacom is what to do with Paramount Pictures. The studio is a diminished asset that by some estimates will lose $300 million this year. Dauman earlier this year initiated an auction process to sell a 49% interest in the studio to a strategic investor. His goal was to find a partner who could help the studio in international markets or on the digital front. But Dauman’s pursuit of a Paramount sale appeared to have been the last straw for the Redstone camp.

The other question that has the industry guessing is whether there is a re-marriage in the cards for Viacom and CBS Corp. The two TV giants were brought together by National Amusements’ acquisition of the Eye in 2000, but were split again in 2006 out of Redstone’s concern that both companies were undervalued by Wall Street. Over the past 10 years, CBS Corp.’s growth and transformation in the fast-changing media landscape has outpaced Viacom’s, defying expectations at the time of the 2006 split. That has spurred speculation in financial and media circles that the Redstones will turn to CBS’ chairman-CEO Leslie Moonves to run the recombined company.

Multiple sources familiar with the situation insist that at present there are no concrete steps being taken in that direction. The Redstones’ have their hands full wading through the thicket of legal and corporate challenges at Viacom.

Moreover, sources stress that bringing CBS and Viacom back together would not be a quick or simple task, even with the overwhelming control that National Amusement exerts over both companies. (Redstone controls about 80% of the voting shares in both firms.) CBS’ board of directors would have to agree to an acquisition or merger deal, and it would be hard to make a case that Viacom as it stands today is an attractive target for CBS. Viacom has already been under the microscope on Wall Street for governance concerns, despite Redstone’s iron grip on the company. It would surely set off alarm bells if CBS investors felt they were being forced to accept a bad deal.

For now, sources emphasize the focus is on righting the ship and identifying “the path forward” for Viacom. If that can’t be done by Sept. 19, an army of lawyers will start digging trenches inside a Massachusetts courtroom.

(James Rainey contributed to this report.)