When you buy phones from different carriers, they are set to ignore bands or channels that the carrier doesn’t use. It serves several purposes. Firstly to make sure you can’t take to phone to another carrier. Secondly to make sure your phone doesn’t waste time and battery tuning to cell towers that won’t accept them (if you have an AT&T service, the T-Mobile tower will reject you even if you can talk to it) 3).
There’s software that picks the best tower out of all the towers your phone can hear/talk to (you might be able hear/talk to multiple towers from your carrier, you want to pick the closest one or the one that supports the fastest data, etc).
When you make an emergency call, the software that’s responsible for picking to tower tells the tuning software “THIS IS A FUCKIN EMERGENCY CALL. FULL SPEED AHEAD! CONNECT TO WHATEVER YOU CAN FIND”. The tuning software also keeps track of the last few bands/channels in which it saw any signal. It’ll try them first so that you can connect the call quickly. If it can’t find any, it’ll do a full sweep of all the bands the physical hardware can possibly tune to.
Once it finds a tower, the software for making calls says “HEY MAN, I KNOW WE MIGHT NOT BE COOL WITH EACH OTHER, BUT THIS IS A FUCKIN EMERGENCY CALL MAN! CAN YOU PLEASE CONNECT THIS?”.
The tower goes “OH FUCK! SHIT! I’ll connect you”. If the tower is at full capacity, it’ll kick out someone who’s not in an emergency call and then connect the incoming emergency call.
In fact, you don’t even need a SIM card (in some countries) or ever have had service in a cell phone to make an emergency call. That’s why when there’s no SIM card, the phone will still tune to a tower with good signal and show “Emergency call mode”. This is to make sure we don’t waste time when you actually need to make an emergency call. This is why if you are in an area with no cell service from any carrier, your phone drains the battery soon – because it keeps searching each band asking “Can any tower hear me?”. So you should put it in airplane mode. And if you are in airplane mode and make an emergency call, it’ll automatically get out of airplane mode. Again to save you time.
In case your call disconnects, you phone will connect back to the same tower again. This is so that the carrier can try to locate you using the tower signals. If you had connected to another tower, the emergency people might have to connect to the different carrier and start locating you all over again.
Disclaimer: don’t try the next part in a real emergency unless you really don’t have any other options. I’m not sure all phones do, but a significant portion of them will.
Each country has a different emergency call number. It’s 911 in the US, it’s 112 (I think) in Europe, something else in Japan. What if someone goes to a different country and get into an emergency? They won’t remember what that country’s emergency number is — so the software in your phone will see you are dialing 911 in Europe and go “this person just wants to make an emergency call. I’ll just connect to 112 instead”.
There’s a ton of cool stuff that goes on in your phone and the carrier to make sure we do absolutely anything possible to connect an emergency call.
There might be cellphone signal, it just might not be a signal from your phone carrier. Say you have a contract with company A, but all the cell towers around you can only connect you to company B. obviously you can’t use that signal.
However all cell phone networks, irregardless of what company they serve, must serve emergency calls by law. If your phone has any signal to any network around it it can make an emergency call, it just might not be able to make a normal call.