DAHDI is the driver layer used by Asterisk to communicate with telephony hardware.
After installing the DAHDI packages, check that the card is detected:
lspci
sudo dahdi_hardware
Generate the base configuration:
sudo dahdi_genconf
sudo dahdi_cfg -vv
Useful files to inspect:
/etc/dahdi/system.conf/etc/asterisk/chan_dahdi.conf
After changes, restart the DAHDI service and reload Asterisk:
sudo systemctl restart dahdi
sudo asterisk -rx "module reload chan_dahdi.so"