Open Source - How do I change the packetization (chunk size in ms) for G.729a or other codec?
The canonical reference for this is the rtp-packetization.txt file in the latest release of Asterisk.
For a low-bandwidth G.729a link, you may want to put a bit more data in each packet. The default is 30 milliseconds, but you can change it in sip.conf with a line like this:
allow=ulaw:30,alaw,g729:60
That will change G.729a to put 60ms of data in each packet, which is twice the default. That line also changes ulaw to 30ms per packet, and does not change packetization for alaw.
As of Asterisk 1.6.2, packetization is supported in these channels:
chan_sip
chan_skinny
chan_h323
chan_ooh323 (Asterisk-Addons)
chan_gtalk
chan_jingle
chan_sip additionally supports autonegotiation.
If the global section of sip.conf has the line:
autoframing=yes
Then the other end of a SIP call can request packetization with the ptime parameter.
Note that autonegotiation will default to 20ms packetization if the other end does not specify any value.
The document doc/rtp-packetization.txt includes a table of the minimum, maximum and step sizes for packetization for each codec.