Codecs
From FreeSWITCH Wiki
FreeSWITCH supports a large number of VoIP compression codecs out of the box, however the default config does not enable them all for all transport types.
The vars.xml file contains the the following right near the top of the file (line 59 and 60):
<X-PRE-PROCESS cmd="set" data="global_codec_prefs=G722,PCMA,PCMU,GSM"/> <X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=G722, PCMA,PCMU,GSM"/>
Note: iLBC@30i configures the iLBC codec to default to 30ms frames instead of 20ms frames which will allow you to receive iLBC calls from Asterisk servers which unfortunately do not correctly send their iLBC codec preferences.
Most transports (channels) have a config block at the top of their configuration file like the following:
<settings> <param name="codec-prefs" value="XXXXXXX"/> </settings>
Note: There are generally other lines inside the <settings> block, but you can safely ignore them for now.
dingaling.conf.xml
The default dingaling.conf.xml config contains the following (codec related) settings:
<settings> <param name="codec-prefs" value="PCMU"/> </settings>
While you may use almost any codec you wish when using dingaling to talk between two FreeSWITCH servers, the official Google Talk(tm) client has some very peculiar quirks in its codec handling so most people will probably want to change this to something like:
<settings> <param name="codec-prefs" value="speex,speex@16000k,iLBC102,PCMA,PCMU"/> </settings>
iax.conf.xml
The default iax.conf.xml config contains the following (codec related) settings:
<settings> <param name="codec-prefs" value="PCMU@20i,PCMA,speex,L16"/> <param name="codec-master" value="us"/> <param name="codec-rates" value="8"/> </settings>
sofia.conf.xml
The default sofia.conf.xml config contains the following (codec related) settings:
<settings>
<param name="codec-prefs" value="$${default_codecs}"/>
<param name="codec-ms" value="20"/>
</settings>
This allows Sofia-SIP to inherit the default_codecs which we configured in freeswitch.xml. I suggest you leave it that way, however you may manually specify a codec list if you wish. I do suggest that you change codec-ms to 30ms to save more bandwidth in exchange for a slight latency hit.
