Remove Last Codec and Change Port
sip-manipulation
name removeLastCodec
description remove the last codec
mime-sdp-rule
name removeLastCodec
msg-type request
methods INVITE
action manipulate
comparison-type case-sensitive
match-value
new-value
sdp-media-rule
name removeLast
media-type audio
action manipulate
comparison-type case-sensitive
match-value
new-value
sdp-line-rule
name isLastCodec
type m
action store
comparison-type pattern-rule
match-value ^(audio )([0-9]{4,
5})( RTP/AVP
[0-9]{1-3})$
new-value
sdp-line-rule
name changePort
type m
action replace
comparison-type boolean
match-value $removeLastCodec.
$removeLast.$isLastCodec
new-value $removeLastCodec.
$removeLast.$isLastCodec.$1+0+$removeLastCodec.$removeLast.
$isLastCodec.$3