Let's also include aclocal.m4
[asterisk-bristuff.git] / doc / rtp-packetization.txt
blob647375a9831e45a1c85450f36d5db68b978b15f8
1 Overview
2 -------
3 Asterisk currently supports configurable RTP packetization per codec for 
4 select RTP-based channels.
6 Channels
7 -------
8 These channel drivers allow RTP packetization on a user/peer/friend
9 or global level:
10     chan_sip
11     chan_skinny
12     chan_h323
13     chan_ooh323 (Asterisk-Addons)
15 Configuration
16 -------
17 To set a desired packetization interval on a specific codec,
18 append that inteval to the allow= statement.
20 Example:
21 allow=ulaw:30,alaw,g729:60
23 No packetization is specified in the case of alaw in this example,
24 so the default of 20ms is used.
26 Autoframing
27 -------
28 In addition, chan_sip has the ability to negotiate the desired
29 framing at call establishment.
31 In sip.conf if autoframing=yes is set in the global section, then
32 all calls will try to set the packetization based on the remote
33 endpoint's preferences.  This behaviour depends on the endpoints
34 ability to present the desired packetization (ptime:) in the SDP.
35 If the endpoint does not include a ptime attribute, the call will 
36 be established with 20ms packetization.
38 Autoframing can be set at the global level or on a user/peer/friend
39 basis.  If it is enabled at the global level, it applies to all
40 users/peers/friends regardless of their prefered codec packetization.
42 Codec framing options
43 -------
44 The following table lists the minimum and maximum values that are
45 valid per codec, as well as the increment value used for each.
46 Please note that the maximum values here are only recommended
47 maximums, and should not exceed the RTP MTU.
49 Name            Min             Max             Default         Increment
50 g723            30              300             30              30
51 gsm             20              300             20              20
52 ulaw            10              150             20              10
53 alaw            10              150             20              10
54 g726            10              300             20              10
55 ADPCM           10              300             20              10
56 SLIN            10              70              20              10
57 lpc10           20              20              20              20
58 g729            10              230             20              10
59 speex           10              60              20              10
60 ilbc            30              30              30              30
61 g726_aal2       10              300             20              10
63 Invalid framing options are handled based on the following rules:
64   1.  If the specified framing is less than the codec's minimum, then
65         the minimum value is used.
66   2.  If the specific framing is greater than the codec's maximum, then
67         the maximum value is used
68   3.  If the specificed framing does not meet the increment requirement,
69         the specified framing is rounded down to the closest valid
70         framing options.
71                 example allow=ulaw:33 will set the codec to 30ms framing
72   4.  If no framing is specified in the allow= directive, then the
73         codec default is used.