Hi!
in this scenario (remote country, local Asterisk instance, Yealink SIP phones, multiple SIP trunks), the right codec mainly depends on bandwidth, latency, packet loss, and CPU capacity on the PBX.
If the internet connection is stable and you have enough bandwidth, I would simply stay with G.711 (alaw or ulaw depending on the region). It gives very good voice quality, no transcoding is required in most setups, CPU load stays low, and compatibility with SIP trunks is usually perfect. The bandwidth usage is around 80–100 kbit/s per call including overhead, which is fine in most cases.
If the connection is unstable or bandwidth is limited, Opus is technically the better choice. It delivers very good quality at lower bitrates and handles packet loss much better than G.711. For classic telephony, I would use Opus in VoIP mode with wideband (16 kHz). Fullband (48 kHz) does not really bring advantages for normal phone calls but increases bandwidth usage.
G.729 would only make sense if bandwidth is extremely limited or if a provider requires it. It is license-based, offers lower quality compared to Opus, and is mostly outdated today.
One important practical point: if your trunks only support G.711 and your phones use Opus, Asterisk has to transcode, which increases CPU load. Ideally, you avoid transcoding where possible.
My recommendation:
If the connection is stable → stay with G.711.
If the connection is weak or unreliable → use Opus (wideband, VoIP mode), provided that all devices and trunks support it.
If you can share more details about available bandwidth and trunk codec support, I can give a more specific recommendation.