Hi, can someone just check my understanding of how the codec’s work in relationship with phones and trunks.

I’m hoping that the codec I insist on using on the trunk (disallow all, etc) is the codec used both on incomming and outgoing data. So if the phones are using g.711 and the trunks are using gsm, all the traffic over the trunk (both directions) will only be gsm. And the g.711 is just between the phones and the Asterisk box?



Allowed codec can be set for every SIP channel individually.

Every incomming/outgoing call has two legs (PSTN-Asterisk and Asterisk-IP Phone). If both legs are using the same codec (which is best), Asterisk only does packet switching for voice between the two call legs. If the call legs are using different codec, Asterisk has to do transcoding, which significanlty increases the CPU load.