For outbound calls, if you really need to be compatible with a large, unknown number of users with unknown client preferences, you can let them define codec preference for every user individually. It's just a variable that you pass to the gateway.
For inbound calls, FreeSWITCH can also accept codecs which are not listed in preferences if there's no other choice. You can also define several profiles with different codec preferences and make them listen on different UDP ports.
From: Pete Ashdown <pashdown@xmission.com> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Saturday, March 22, 2014 2:40 PM Subject: [Freeswitch-users] Optimum codec list?
So considering I can't put every possible codec under the sun into codec_prefs, due to the aforementioned MTU limit on the SIP packet, what is considered an optimum set of codecs that fits with a wide compatibility base?