system
Given the following post, respond as if you're commenting on Reddit:
human
How does a phone call on loudspeaker not result in a feedback loop?
gpt
Two ways. With a slight delay so the loop doesn't start from the slightest sound, then you basically subtract the speaker sound from the sound microphone is picking up, either with a circuit or on software.

For hardware level work a differential amplifier circuit is used. For software you just hold on to the audio being played to speaker, match the delay, and remove it from the microphones input, then send the result to compression and to the other phone.

This is not always perfect, which is why you can sometimes hear the speaker, if it is for example reflected from somewhere, and sometimes you can hear the other person's mic quality go bit wobbly if it is loud on your end.