Exhibit 5.1

                                                                 May 24, 1999


Excel Switching Corporation
255 Independence Drive
Hyannis, Massachusetts  02601

      Re:     Registration Statement on Form S-8 Relating to the
              RAScom, Inc. 1996 Stock Plan (the "Plan")

Ladies and Gentlemen:

      Reference is made to the above-captioned Registration Statement on Form
S-8 (the "Registration Statement") filed by Excel Switching Corporation (the
"Company") with the Securities and Exchange Commission under the Securities Act
of 1933, as amended, relating to an aggregate of 64,710 shares of Common Stock,
$.01 par value, of the Company (the "Shares").

      We are counsel to the Company and are familiar with the proceedings of its
stockholders and Board of Directors. We have examined original or certified
copies of the Company's restated certificate of incorporation, the Company's
restated by-laws, the corporate records of the Company to the date hereof, and
such other certificates, documents, records and materials as we have deemed
necessary in connection with this opinion letter.

      We are members only of the Bar of the Commonwealth of Massachusetts and
are not experts in, and express no opinion regarding, the laws of any
jurisdiction other than the Commonwealth of Massachusetts and the United States
of America, and the General Corporation Law of the State of Delaware.

      Based upon and subject to the foregoing, we are of the opinion that the
Shares issued or proposed to be issued by the Company pursuant to the Plan will
be, upon receipt of the consideration provided for in the Plan, validly issued,
fully paid and nonassessable after issuance of such Shares in accordance with
the terms of the Plan.

      We hereby consent to the filing of this opinion as Exhibit 5.1 to the
Registration Statement.

                                          Very truly yours,

                                          /s/ Testa, Hurwitz & Thibeault, LLP
                                          ------------------------------------
                                          TESTA, HURWITZ & THIBEAULT, LLP