From openSIPS

About: News0034

About -> News -> SDP codec manipulation


SDP codec manipulation

New functions have been added for SDP codec manipulation in the textops module:

Each of them can take a codec name and an optional clock parameter. If the clock is unspecified all of the codecs with that name will match.

All of the methods will act on all streams from all sessions inside the SDP.

You can use these methods one after another to get a desired effect.

E.g. To make GSM the least prefered codec but GSM/8000 the most prefered of all GSM codecs use:

codec_move_up("GSM","8000");
codec_move_down("GSM");

Once a codec was deleted it will not be detected by codec_exists().

Retrieved from https://www.opensips.org/About/News0034
Page last modified on July 23, 2009, at 02:13 PM