Traditionally extensions are the phones inside your building (connected via FXS ports_, and the link to the FXO is a PSTN trunk. I assume what you have are two analogue telephone sets connected to the SPA112 (via 2 x FXS ports), and an FXO card connected to your usual PSTN line from the telephone company, and that when someone from outside calls the extension and clears (hangs up) DAHDI has still seized the PSTN line so the person on the extension hears what is going down it (which is the error tone from the local telephone exchange, as they do not want you tying up their equipment!)
VOIP stuff can be confusing (even if you have dealt with analogue telecoms equipment before) due to the config files, Asterisk treats everything as an “extension” (as its basically trying to be a whole telephone exchange). Some frontends like FreePBX hide this from the end user until you start doing advanced stuff.
what country are you in and what is your telephone provider? if its a European country you may be in luck as I have a copy of the entire ETSI specificiations for all analogue lines. If your first language is French, Dutch or German I might even be able to delve deeper into the specifications when I get time…
Since the 1980s and the increasing use of telephone answering machines and small home/office PABX’s, most analogue lines have been able to provide disconnect supervision.
The most commonly encountered methods are a short break in the current of DC electricity in the telephone line (100-800ms), or reversing the polarity of the line. we call this “Disconnect Clear signal” in UK , in USA it is called CPC (called party clearing), in the UK CPC is a company which sells electronic stuff (including telephones )
Most domestic lines will return the disconnect clear signal then the “error tone” after a called party has cleared but the nature of this tone varies from country to country, Asterisk can be configured to detect these things. it works fairly reliably with disconnect clear signal (although this can be shorter on domestic lines than business lines) and is supposed to be able to detect error tone (I haven’t tried this).
In some cases your telephone company can change the signalling so your PABX recognises it.