Actions

Toolpack:Profile SDP Description

Revision as of 11:43, 13 March 2017 by Luc Morissette (talk | contribs) (LM Added AMR-WB and G.722 example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

You can specify the Profile SDP Description to define which voice codecs are supported in the NAP using this Profile.

Here is the default Profile SDP Description.

m=audio 0 RTP/AVP 0 8 4 18 101 13
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15,32-36

Each line of the Profile SDP Description consists of text of the form <type>=<value>. <type> is always exactly one character and is case-significant. <value> is a structured text string whose format depends on <type>. It also will be case-significant unless a specific field defines otherwise. Whitespace is not permitted either side of the `=' sign. In general <value> is either a number of fields delimited by a single space character or a free format string.

In our Profile SDP Description, only 2 <type> are used.


Media Announcement

The format of media announcement is as follows.

m=<media> <port> <transport> <fmt list>
  • The first sub-field is the media type. Currently defined media for TMedia is "audio".
  • The second sub-field is the transport port to which the media stream will be sent. In Toolpack, it is not specified in Profile SDP Description and therefore you should specify "0".
  • The third sub-field is the transport protocol. For most of the application, you may specify it as "RTP/AVP" - the IETF's Realtime Transport Protocol using the Audio/Video profile carried over UDP.
  • The fourth and subsequent sub-fields are media formats. For audio and video, these will normally be media payload types as defined in the RTP Audio/Video Profile. When a list of payload formats is given, this implies that all of these formats may be used in the session, but the first of these formats is the default format for the session. When the transport protocol is specified as "RTP/AVP", the payload format can be specified as either
    • the payload type number for static payload types
    • the payload type number along with additional encoding information for dynamically allocated payload types.

The payload type, which is carried in the actual RTP packet header, is used to identify the type of codec information carried in the packet. A list of payload type values for each codec is defined within RFC3551. Unfortunately, since the payload type field is only 7 bits-wide, all codecs cannot have a permanent payload type value understood universally by all VoIp systems. Therefore, some codecs have dynamic values that need to be negotiated through a call control or session control protocol such as SIP before the actual RTP session can take place.

Here is the list of codec payload type values per RFC3551.

CodecPayload type value
G.711 uLaw0
G.723.14
G.711 aLaw8
G.7229
Comfort Noise13
G.72815
G.729AB18
G.726-40dynamic
G.726-322 or dynamic (depends on the network)
G.726-24dynamic
G.726-16dynamic
G.729EGdynamic
AMRdynamic
EVRCdynamic
QCELPdynamic

When you use dynamic payload types, you need to specify the additional encoding information using the attribute for media announcement.

Attribute for Media Announcement

A media description may have any number of attributes ("a=" fields) which are media specific. The format of attribute is as follows.

a=
or
a=:<value>

Here are some examples of attributes.


Dynamic payload type

You specify the additional encoding information for dynamic payload type in the following format:

a=rtpmap:<payload type> <encoding name>/<clock rate>[/<encoding parameters>]

For audio streams, <encoding parameters> may specify the number of audio channels. This parameter may be omitted if the number of channels is one provided no additional parameters are needed.


Other media specific attribute

The use of other media specific attributes depends on the specification of the RTP payload format for the specific media type. Here are some example of attributes.

  • a=fmtp:<format> <format specific parameters>

This attribute allows parameters that are specific to a particular format to be conveyed in a way that SDP doesn't have to understand them. The format must be one of the formats specified for the media. Format-specific parameters may be any set of parameters required to be conveyed by SDP and given unchanged to the media tool that will use this format.

  • a=ptime:<packet time>

This gives the length of time in milliseconds represented by the media in a packet. This is probably only meaningful for audio data. It should not be necessary to know ptime to decode RTP or vat audio, and it is intended as a recommendation for the encoding/packetisation of audio. It is a media attribute, and is not dependent on charset.


Examples

Here are some examples of the attributes found in the default profile SDP description.

a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20

The above defines iLBC codec of 8000/sec sample rate with 20ms frame size.

 a=rtpmap:98 telephone-event/8000

The above defines the DTMF and telephony tones relay over RTP using RFC2833.

Here is another example, enabling Voice Activity Detection (VAD) for G.711 ulaw, G.711 alaw, G.723.1a and G.729b. It also enable relay of DTMF events 0 to 15 and telephony tones events 32 to 36.

m=audio 0 RTP/AVP 0 8 4 18 98 13
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=fmtp:4 bitrate=6300;annexa=yes
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=yes
a=rtpmap:98 telephone-event/8000
a=fmtp:98 0-15,32-36
a=rtpmap:13 CN/8000

Another example to disable silence suppression explicitly in the SDP.

m=audio 0 RTP/AVP 0 8 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15,32-36
a=silenceSupp:off - - - -

Below shows an example to enable GSM-FR with a dynamic payload type 99:

m=audio 0 RTP/AVP  18 4 8 0 96 97 98 99 13
a=rtpmap:96 iLBC/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:98 telephone-event/8000
a=rtpmap:99 GSM-FR/8000
a=fmtp:4 bitrate=6.3
a=fmtp:4 annexa=no

Note:
1. Your toolpack license needs to be GSM enabled. Please contact TelcoBridges support if you are not sure.
2. You may need additional third party GSM license(s) from the corresponding patent holders. e.g. GSM-EFR, GSM-HR


Below shows an example to enable GSM-FR with a dynamic payload type 99:

m=audio 0 RTP/AVP  18 4 8 0 96 97 98 99 13
a=rtpmap:96 iLBC/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:98 telephone-event/8000
a=rtpmap:99 GSM-FR/8000
a=fmtp:4 bitrate=6.3
a=fmtp:4 annexa=no

This example is G.711 alaw with a 10ms packet (instead of the default 20ms) :

m=audio 0 RTP/AVP  8
a=rtpmap:8 PCMA/8000
a=ptime:10

This example is AMR-WB (using dynamic payload type 113) and G.722 (static payload type 9) :

m=audio 0 RTP/AVP  113 9 
a=rtpmap:113 AMR-WB/16000


References

  • RFC2327 - SDP: Session Description Protocol
  • RFC3551 - RTP Profile for Audio and Video Conferences with Minimal Control
  • RFC3952 - Real-time Transport Protocol (RTP) Payload Format for internet Low Bit Rate Codec (iLBC) Speech
  • RFC2833 - RTP Payload for DTMF Digits, Telephony Tones and Telephony Signals