Script
/*Looks into messages in the INVITE session only (It includes all messages in the INVITE dialog)
within session "INVITE" {
*/act on request where %DIRECTION="INBOUND" and %ENTRY_POINT="AFTER_NETWORK"
{
/*The “m=” field in SDP contains information about the type of media session. It includes the format-list parameter for specifying the codecs. Assuming that the message comes in with 2 codecs, we add a third codec as 101 */
%SDP[1]["s"]["m"][1].FORMATS[3]="101";
/*The “a=” field contains attributes to provide more information on the codecs. Assuming that the message does not have any fmtp attribute,we add the first one as 101 0-16*/ %SDP[1]["s"]["m"][1].ATTRIBUTES["fmtp"][1]="101 0-16";
}
}