
115 Cal.App.3d 123 (1981)
171 Cal. Rptr. 191
FARRAR, HERRICK & ASSOCIATES, Plaintiff and Appellant,
v.
SAFECARE COMPANY, INC., Defendant and Respondent.
Docket No. 57339.
Court of Appeals of California, Second District, Division Three.
January 23, 1981.
*125 COUNSEL
Lewis & Cowett, William O. Lewis, Breidenbach, Swainston, Yokaitis & Crispo and W.F. Rylaarsdam for Plaintiff and Appellant.
Karns & Karabian and Lawrence Graze for Defendant and Respondent.
OPINION
KLEIN, P.J.
Plaintiff and Appellant Farrar, Herrick & Associates (Farrar), a corporation, appeals from an order under Code of Civil Procedure section 583, subdivision (b),[1] dismissing its action against defendant and respondent Safecare Company, Inc. (Safecare), a corporation, for failure to bring the case to trial within five years.


*126 CONTENTIONS
Farrar contends that the trial court erroneously dismissed the instant case because: (1) the exchange of correspondence between Farrar and Safecare constituted a written stipulation pursuant to section 583, subdivision (b), which stipulation waived the mandatory dismissal provisions of this section; and (2) the doctrine of estoppel should have barred dismissal.

DISPOSITION
The open-ended extension of time to plead constituted a binding agreement between Farrar and Safecare excusing Farrar from diligence in prosecution of the action, and Safecare thereby waived its right to a dismissal.

FACTS
Farrar filed a complaint to recover a balance due on a contract with Safecare and to foreclose a mechanic's lien on July 3, 1973. Safecare filed an acknowledgement of receipt of summons on July 18, 1973.
Thereafter, negotiations for resolution of the dispute were conducted between the parties. On July 30, 1973, Safecare requested an extension of time, and a written consent extending the time for Safecare to file a responsive pleading to August 31, 1973, was granted by Farrar.
Settlement negotiations continued and on March 19, 1974, Safecare wrote Farrar as follows: "I continue to rely on the agreement I have made with you that no further action will be taken by you, including particularly anything like a default judgment, without sufficient notice from you...."
On September 1, 1977, Farrar gave written notice to Safecare to file a responsive pleading within 20 days from receipt of the letter.
No responsive pleading from Safecare was forthcoming, so on February 9, 1979, five years and six months after the complaint was filed, Farrar filed a request for entry of default, which motion was granted, and the default judgment was entered by the clerk on February 9, 1979. A default hearing to prove up damages was set for March 30, 1979.
*127 Thereafter, on March 20, 1979, five years and seven months after the filing of the complaint, Safecare filed a notice of motion to dismiss under section 583, subdivision (b), which motion was granted on April 30, 1979.

DISCUSSION
(1a) It now seems clear that the correspondence between the parties herein constituted an open-ended extension of time in which to plead granted to Safecare by Farrar, and said extension was the equivalent of a written stipulation within the contemplation of section 583, subdivision (b). The critical issue, however, is whether the extension in the present fact situation excused Farrar from bringing the action to trial within five years after it was filed so as to defeat Safecare's dismissal.
We look for guidance to General Ins. Co. v. Superior Court (1975) 15 Cal.3d 449 [124 Cal. Rptr. 745, 541 P.2d 289], and its predecessors Bank of America etc. v. Superior Court (1937) 22 Cal. App.2d 450, 453 [71 P.2d 296], and others, and its progeny, Meraia v. McCann (1978) 83 Cal. App.3d 239 [147 Cal. Rptr. 756], and Regan Distributors, Inc. v. Yurosek & Son, Inc. (1979) 88 Cal. App.3d 924 [152 Cal. Rptr. 127].
In General, plaintiff granted defendant several specific time extensions to answer which defendant acknowledged by letter, followed eventually by an open extension terminable on 10 days' written notice. About three and a half years after the commencement of the action, plaintiff gave defendant such written notice to plead, and defendant moved for a dismissal pursuant to the three-year statute of limitations set forth in section 581a, subdivision (a).[2]
The Supreme Court in General denied defendant's petition for a writ of mandate compelling dismissal, holding that the written stipulation amounted to a general appearance by the defendant, that the stipulation extended the time to answer indefinitely subject only to termination *128 by notice, and that the stipulation remained in force through the expiration of the statutory periods.
In concluding that "... the three provisions [of the diligence statutes] allow extension of time by filed written stipulation, reflecting that the policy of diligence is subordinate to the parties' own interests" (Id., at p. 454), the court reasoned that "[h]aving by the instant written agreement precluded plaintiff from taking a default judgment prior to expiration of the three-year period, petitioner may not now rely on plaintiff's failure to take default to obtain dismissal of the action. Our conclusion meets the purpose of the statute. Expressly reflecting petitioner's intent to obtain time to answer and by necessary implication precluding default judgment, the agreement establishes the requisite mutual intent allowing each party to excuse the other from diligence both in answering and in taking default...." (Original italics; fns. omitted.) (Id., at pp. 455-456.)
General was followed by Meraia, which dealt with the discretionary two-year period set forth in section 583, subdivision (a).[3] There, plaintiffs granted defendants open-ended extensions of time in which to file responsive pleadings subject to a 10-day written notice. No action was taken until four years later, at which time plaintiffs' attorney requested answers to be filed. However, defendants' motion to dismiss was granted. In reversing, the court concluded "that defendants may not rely upon any lack of diligence on the part of plaintiffs prior to the termination of the open-ended extension of time to plead. No substantial time elapsed from the time such notice was given until the case was dismissed; consequently, it was an abuse of discretion to dismiss the case." (Meraia v. McCann, supra, 83 Cal. App.3d 239, at p. 246.)
Likewise in Regan Distributors, Inc. v. Yurosek & Son, Inc., supra, 88 Cal. App.3d 924, at page 929, the court reversed the dismissal of a four-year-old case, granted pursuant to section 583, subdivision (a), for want of prosecution. Considering itself also bound by General, the court found that defendants' counsel informally, although in writing, granted plaintiffs' counsel an open-ended extension of time for the hearing of demurrers and that the two-year procedural delay could not be charged against the plaintiffs for purposes of upholding the discretionary dismissal.
*129 (2a) Although General involved the three-year statute of limitations, the court discussed the specific diligence statute involved in the case at bench, stating that "[a] written stipulation extends section 583's five-year term for bringing the action to trial if it expressly either waives the right to dismissal, or extends the time of trial to a date beyond the five-year period. But merely extending the time of trial to sometime within the five-year term  absent a showing the parties intended otherwise  will not extend the deadline. (J.C. Penney Co. v. Superior Court (1959) 52 Cal.2d 666, 669....) The instant case falls between the two rules set forth in J.C. Penney. Here, the stipulation does not expressly extend time either within or beyond the allotted period. Rather, time is extended indefinitely, subject to termination by notice, and the stipulation remained in force at expiration of the period." (Original italics.) (General Ins. Co. v. Superior Court, supra, 15 Cal.3d 449, at p. 455.)
Penney upheld the dismissal of plaintiffs' action on a showing of facts vastly different from the state of the record herein. There, plaintiffs filed the action on December 31, 1953, but did not serve the first amended complaint and summons on the defendant until December 31, 1956. Defendant filed its answer on January 21, 1957. On December 5, 1957, nearly four years after the action was commenced, plaintiffs filed a memorandum to set the case for trial. The court set the pretrial conference for March 21, 1958, and the trial for May 15, 1958. However, before the pretrial conference date, plaintiffs and defendant entered into the following agreement: "`It is hereby stipulated ... that the pre-trial conference ... may be continued to be re-set upon motion of either party'" ... to permit the parties to complete ... discovery ...'" (Penney, supra, at p. 668.)
Both parties thereafter continued with discovery proceedings actually preparing for trial. The parties had submitted a joint pretrial statement, and the court had filed a pretrial conference order. Nearly two months remained after the discovery proceedings had been completed in which plaintiffs could have brought the case to trial, and the court held the plaintiffs should have done so. Failing in that responsibility, the defendants had the right to prevail on a dismissal motion.
(1b) In our case, the stipulation did not expressly waive the right to a dismissal nor extend the time of trial beyond the five-year period. Time was, however, extended indefinitely, subject to termination by *130 notice, but the stipulation did not remain in force at the expiration of the five-year period, and that last fact makes the circumstances before us different from General.
Here, the letter extension-stipulation took effect March 19, 1974, with Safecare indicating it was relying on Farrar not to take a default judgment without "sufficient notice." On September 1, 1977, Farrar gave Safecare written notice to file a responsive pleading within 20 days. Safecare did not respond. No further action between the parties took place. After the five-year period had expired, Farrar obtained a default judgment on February 9, 1979, and set a hearing to prove up damages for March 30, 1979, duly notifying Safecare. Thereafter, Safecare immediately took advantage of the five-year expiration and moved for a dismissal on March 20, 1979, which motion was granted without comment by the trial court on April 30, 1979.
Safecare made its motion for a dismissal on March 20, 1979, without moving to set aside the default judgment which had been duly entered by the clerk on February 9, 1979. The effect of the clerk's entry of the default was to cut off Safecare's right to take any further affirmative steps such as pleadings or motions. (Brooks v. Nelson (1928) 95 Cal. App. 144, 147 [272 P. 610]; Mackie v. Mackie (1960) 186 Cal. App.2d 825, 830-832 [9 Cal. Rptr. 173].) Safecare therefore had no standing to move for a dismissal unless and until it prevailed in a motion to set aside the default judgment previously entered in favor of Farrar.
Although the circumstances in the case before us do present a slightly different twist from the numerous cases in the field wherein the courts have sought to avoid the harsh effects of the diligence-dismissal statutes which were being invoked unfairly in situations where the parties intended not to be bound, nonetheless the principles of contract law enunciated therein would apply and control here. (2b) "Stipulations under Section 583 ... are no different from other contracts (Smith v. Bear Valley etc. Co., 26 Cal.2d 590, 601 ...), and are subject to the same rules of construction (Woley v. Turkus, 51 Cal.2d 402, 407...)." (J.C. Penney Co. v. Superior Court, supra, 52 Cal.2d 666, at p. 669.)
General, which is the most recent leading case in the area, speaks in terms of mutual intent to excuse diligence. (General Ins. Co. v. Superior Court, supra, 15 Cal.3d 449, at p. 456). Other cases have found waiver of the right to invoke the provisions of a diligence statute. *131 (Bank of America, etc. v. Superior Court (1937) 22 Cal. App.2d 450, 452, 453 [71 P.2d 296]; see Smith v. Bear Valley etc. Co., supra, 26 Cal.2d 590, 599 [160 P.2d 1].) In Woley v. Turkus, supra, 51 Cal.2d 402, 406-407 [334 P.2d 12], the court reversed a dismissal under the same statute involved here, finding that "the statute is not designed to arbitrarily close the proceedings at all events in five years. It expressly permits the parties to extend the period without limitation by written stipulation. [Citations.] Exceptions have been recognized by the courts." The Woley case found an exception under the circumstances involved, indicating that "[t]he circumstances include not only the terms of the written stipulation but the acts and conduct of the parties...," and utilized an estoppel theory. (Woley v. Turkus, supra, 51 Cal.2d 402, at p. 407; Tresway Aero, Inc. v. Superior Court (1971) 5 Cal.3d 431, 441-442 [96 Cal. Rptr. 571, 487 P.2d 1211].)
(1c) The apparent overriding guiding principle in the decision of the cases has been to give credence to the intent of the parties, and to do so in a reasonable manner. The application of contract principles to the fact situation before us calls for a reversal of the granting of the order of dismissal. By their stipulation and conduct, the parties waived diligence. Once such a waiver has occurred, diligence as prescribed by the statute in question cannot be reinstated without agreement.
(3a) What constitutes lack of due diligence to support a motion for dismissal of an action without relying on the diligence statutes is a question of fact in each case which must be measured in terms of reasonableness and good faith and is within the trial court's inherent discretionary powers. (Tresway Aero, Inc. v. Superior Court, supra, 5 Cal.3d at p. 437.)
(1d) "To allow [Safecare] to prevail would defeat the spirit of the law enunciated on this particular point. `"We are therefore of the view that notwithstanding the mandatory language of section 581a, the trial court is vested with discretion in applying the exceptions comparable to the discretion with which it is vested in applying the exceptions to section 583 [(a)]. (3b) As with the exercise of the court's other inherent and statutory powers to dismiss actions for want of diligence in either serving the summons or bringing the action to trial, the discretion permitted must be `exercised in accordance with the spirit of the law and with a view of subserving, rather than defeating, the ends of substantial justice.' [Citation.]"' ([Citation], italics added.)" (Knapp v. Superior Court (1978) 79 Cal. App.3d 799, 803 [145 Cal. Rptr. 154].)
*132 (1e) Further, Safecare had no standing to move for a dismissal since it had not moved to set aside the default judgment entered against it prior to the date the dismissal motion was filed.
The order of dismissal is reversed and the case is remanded for further proceedings not inconsistent with the views stated above.
Potter, J., concurred.
ALLPORT, J.
I dissent.
In my opinion the trial court took the only rational, logical and legal course open to it in granting this five-year dismissal. Code of Civil Procedure section 583, subdivision (b) clearly, concisely and without ambiguity requires dismissal of any action that is not brought to trial within five years "except where the parties have filed a stipulation in writing that the time may be extended." Here there was no such stipulation and the trial court's duty was clear.
For some reason totally unclear to me the majority has taken an oral agreement extending time to file a responsive pleading confirmed unilaterally in writing and withdrawn some 18 months before the motion to dismiss was filed, to toll the running of the 5-year statute. I have once again examined General Ins. Co. v. Superior Court (1975) 15 Cal.3d 449 [124 Cal. Rptr. 745, 541 P.2d 289]. General had under consideration a dismissal under Code of Civil Procedure section 581a, subdivisions (a) and (c). In the course of the discussion the following comment was made at page 455: "A written stipulation extends section 583's five-year term for bringing the action to trial if it expressly either waives the right to dismissal, or extends the time of trial to a date beyond the five-year period. But merely extending the time of trial to sometime within the five-year term  absent a showing the parties intended otherwise  will not extend the deadline."
Neither General nor Meraia v. McCann (1978) 83 Cal. App.3d 239 [147 Cal. Rptr. 756], is permissive or persuasive authority for the result reached herein. On the contrary, as was said in Taylor v. Shultz (1978) 78 Cal. App.3d 192, 197 [144 Cal. Rptr. 114] (a § 583 subd. (b) case): "We disagree with plaintiff's argument. Plaintiff contends the intent of the law, as expressed in J.C. Penney and General Ins. Co., was met in the present case by a series of determinations made by counsel at the trial setting conference of July 1, 1976; namely, a request for jury trial *133 by all parties; waiver of notice of trial by all parties; and selection of a mandatory settlement conference date. Each of the above determinations, plaintiff contends, brings the court's processes into play in one form or another, and should therefore be treated as tantamount to a written stipulation or oral stipulation entered in the minutes extending the five-year period. Plaintiff cites no authority for such a proposition and there is no language in J.C. Penney or General Ins. Co. to support it. First, the factual situations in said cases were far different from the factual situations faced here and in Singelyn and Wright. Second, there is no inconsistency between the four cases. If anything, J.C. Penney and General Ins. Co. support defendants' argument because they stress the need for a written stipulation that clearly reflects the mutual understanding of all parties."
Furthermore I do not agree that the parties can excuse themselves from diligent prosecution of the action by agreement once they have elected to resort to the use of the judicial process to resolve their difficulties.
I would affirm the order of dismissal.
A petition for a rehearing was denied February 20, 1981, and respondent's petition for a hearing by the Supreme Court was denied March 18, 1981.
NOTES
[1]  Code of Civil Procedure section 583, subdivision (b), states: "Any action heretofore or hereafter commenced shall be dismissed by the court in which the same shall have been commenced or to which it may be transferred on motion of the defendant, after due notice to plaintiff or by the court upon its own motion, unless such action is brought to trial within five years after the plaintiff has filed his action, except where the parties have filed a stipulation in writing that the time may be extended."

All statutory references hereinafter are to the Code of Civil Procedure, unless otherwise indicated.
[2]  Section 581a, subdivision (a), provides "[n]o action ... commenced by complaint shall be further prosecuted ... and ... shall be dismissed ... unless the summons on the complaint is served and return made within three years after the commencement of said action, except where the parties have filed a stipulation in writing that the time may be extended or the party against whom the action is prosecuted has made a general appearance in the action."

Section 581a, subdivision (c), states "[a]ll actions ... shall be dismissed ... if no answer has been filed ... if plaintiff fails ... to have judgment entered within three years after service has been made or [a general] appearance by defendant, except where the parties have filed a stipulation in writing that the time may be extended."
[3]  Section 583, subdivision (a), states "[t]he court, in its discretion, may dismiss an action for want of prosecution ... if it is not brought to trial within two years after it was filed...."
