Suppose a company runs its phone system on a server in its own office, and two employees call each other by extension. Both phones and the phone system sit on the office network, so that call needs no outside connection. It keeps working if the internet service fails, as long as the local network and the phone system have power.
Outside calls are different. They need a route to the public telephone network, such as a trunk from a carrier. If that trunk rides the internet connection that failed, outside calling stops while internal calls carry on.
Hosted service reverses the picture. The system that connects calls lives at the provider, so two desk phones on the same office network have to reach the provider before one can ring the other. If the only path to the provider is the connection that failed, those phones stop, even for a call across the hall. They keep working when a second connection is up and the network is set up to route them over it. Equipment on site that takes over is another approach.
Microsoft documents the on-site approach for Teams Phone with Direct Routing. Its Survivable Branch Appliance guidance describes a branch that loses internet while its internal network stays up, along with the session border controller that connects the branch to the telephone network. With the appliance in place, the Teams client switches to it, and people can keep making and receiving outside calls.
The conditions are specific. The appliance comes through the session border controller's vendor, and the controller has to be configured for media bypass. The supported clients Microsoft lists are the Teams desktop apps for Windows and macOS and Teams Phones. The desktop apps have to run on a physical machine, and web clients and virtual machines aren't supported. Microsoft says location information isn't shared on emergency calls in this mode. Its scenario assumes users can still reach the session border controller that provides the telephone connection, so that connection can't depend on the internet link that failed.