# Sample SMM Rules to manipulate SDP content using the FilerCodec Operation
# Rule 1: re-arrange the codec as appear in the media line in which codec MPV/90000 as the 1st codec
# ,PCMU/8000 if exist, as the last codec and preserve else thing else in their original position. 
set profiles signaling sipAdaptorProfile filterCodec rule 1 criterion 1 type message message messageTypes request methodTypes invite
set profiles signaling sipAdaptorProfile filterCodec rule 1 criterion 1 type message message condition exist
set profiles signaling sipAdaptorProfile filterCodec rule 1 criterion 2 type messageBody messageBody messageBodyType sdp condition exist
set profiles signaling sipAdaptorProfile filterCodec rule 1 action 1 type sdpContent operation filterCodec sdpContentSubType codecByName
set profiles signaling sipAdaptorProfile filterCodec rule 1 action 1 from type value value "MPV/90000,*,PCMU/8000"
set profiles signaling sipAdaptorProfile filterCodec rule 1 action 1 to type sdpContent sdpContent streamType audio streamInstanceId 1
# Rule 2: re-arrange the codec as appear in the media line in which codec wb as the 1st codec
# follow by wc as the second codec. All other codec should be purged. 
# Note: operation on codec is only applicable for media stream with rtp/srtp as transport
set profiles signaling sipAdaptorProfile filterCodec rule 2 criterion 1 type message message messageTypes request methodTypes invite
set profiles signaling sipAdaptorProfile filterCodec rule 2 criterion 1 type message message condition exist
set profiles signaling sipAdaptorProfile filterCodec rule 2 criterion 2 type messageBody messageBody messageBodyType sdp condition exist
set profiles signaling sipAdaptorProfile filterCodec rule 2 action 1 type sdpContent operation filterCodec sdpContentSubType codecByName
set profiles signaling sipAdaptorProfile filterCodec rule 2 action 1 from type value value "wb,wc"
setprofiles signaling sipAdaptorProfile filterCodec rule 2 action 1 to type sdpContent sdpContent streamType application streamInstanceId all
# Rule 3: re-arrange the codec as appear in the media line in which codec H261/90000 as the 1st codec if exist.
# All other codec should be preserved wth its current position. 
set profiles signaling sipAdaptorProfile filterCodec rule 3 criterion 1 type message message messageTypes request methodTypes invite
set profiles signaling sipAdaptorProfile filterCodec rule 3 criterion 1 type message message condition exist
set profiles signaling sipAdaptorProfile filterCodec rule 3 criterion 2 type messageBody messageBody messageBodyType sdp condition exist
set profiles signaling sipAdaptorProfile filterCodec rule 3 action 1 type sdpContent operation filterCodec sdpContentSubType codecByName
set profiles signaling sipAdaptorProfile filterCodec rule 3 action 1 from type value value "H261/90000,*"
set profiles signaling sipAdaptorProfile filterCodec rule 3 action 1 to type sdpContent sdpContent streamType video streamInstanceId 1
# Rule 4: re-arrange the codec as appear in the last audio stream in which codec PCMU/8000,PCMA/8000 as the 1st and 2nd codec if exist.
# All other codec should be preserved wth its current position.
set profiles signaling sipAdaptorProfile filterCodec rule 4 criterion 1 type message message messageTypes request methodTypes invite
set profiles signaling sipAdaptorProfile filterCodec rule 4 criterion 1 type message message condition exist
set profiles signaling sipAdaptorProfile filterCodec rule 4 criterion 2 type messageBody messageBody messageBodyType sdp condition exist
set profiles signaling sipAdaptorProfile filterCodec rule 4 action 1 type sdpContent operation filterCodec sdpContentSubType codecByName
set profiles signaling sipAdaptorProfile filterCodec rule 4 action 1 from type value value "PCMU/8000,PCMA/8000,*"
set profiles signaling sipAdaptorProfile filterCodec rule 4 action 1 to type sdpContent sdpContent streamType audio streamInstanceId last
# Rule 5: re-arrange the codec as appear in the 2nd audio stream in whichcodec PCMU/8000,PCMA/8000 as the 1st and 2nd codec if exist.
# All other codec should be purge. 
set profiles signaling sipAdaptorProfile filterCodec rule 5 criterion 1 type message message messageTypes request methodTypes invite
set profiles signaling sipAdaptorProfile filterCodec rule 5 criterion 1 type message message condition exist
set profiles signaling sipAdaptorProfile filterCodec rule 5 criterion 2 type messageBody messageBody messageBodyType sdp condition exist
set profiles signaling sipAdaptorProfile filterCodec rule 5 action 1 type sdpContent operation filterCodec sdpContentSubType codecByName
set profiles signaling sipAdaptorProfile filterCodec rule 5 action 1 from type value value "PCMU/8000,PCMA/8000"
set profiles signaling sipAdaptorProfile filterCodec rule 5 action 1 to type sdpContent sdpContent streamType audio streamInstanceId 2
  • No labels