# Sample SMM Rules to manipulate SDP content using the GET operations
# 1) getPayloadType
# 2) getCodecPosition
#
# Rule 1 Action 1: store "a=rtpmap:" to variable var1
# Rule 1 Action 2: store payloadtype for codec "PCMA/8000" to var2
# Rule 1 Action 3: append var2 to var1, so that var1 will have "a=rtpmap:xx", xx is the payload type of codec PCMA/8000
# Rule 1 Action 4: add parameter to a line identified by var1
set profiles signaling sipAdaptorProfile sdpGetProfile rule 1 criterion 1 type message message messageTypes request methodTypes invite
set profiles signaling sipAdaptorProfile sdpGetProfile rule 1 criterion 1 type message message condition exist
set profiles signaling sipAdaptorProfile sdpGetProfile rule 1 criterion 2 type messageBody messageBody messageBodyType sdp condition exist
set profiles signaling sipAdaptorProfile sdpGetProfile rule 1 criterion 3 type sdpContent sdpContent codecNames PCMA/8000 condition exist
set profiles signaling sipAdaptorProfile sdpGetProfile rule 1 criterion 3 type sdpContent sdpContent streamType audio streamInstanceId last
set profiles signaling sipAdaptorProfile sdpGetProfile rule 1 action 1 type variable operation store
set profiles signaling sipAdaptorProfile sdpGetProfile rule 1 action 1 from type value value "a=rtpmap:"
set profiles signaling sipAdaptorProfile sdpGetProfile rule 1 action 1 to type variable variableValue var1
set profiles signaling sipAdaptorProfile sdpGetProfile rule 1 action 2 type sdpContent operation getPayloadType sdpContentSubType codecByName
set profiles signaling sipAdaptorProfile sdpGetProfile rule 1 action 2 from type sdpContent sdpContent streamType audio streamInstanceId 1
codecNames "PCMA/8000"
set profiles signaling sipAdaptorProfile sdpGetProfile rule 1 action 2 to type variable variableValue var2
set profiles signaling sipAdaptorProfile sdpGetProfile rule 1 action 3 type variable operation append
set profiles signaling sipAdaptorProfile sdpGetProfile rule 1 action 3 from type variable variableValue var2
set profiles signaling sipAdaptorProfile sdpGetProfile rule 1 action 3 to type variable variableValue var1
set profiles signaling sipAdaptorProfile sdpGetProfile rule 1 action 4 operation add type sdpContent sdpContentSubType parameter
set profiles signaling sipAdaptorProfile sdpGetProfile rule 1 action 4 from type value value ABCDEF=abcdef
set profiles signaling sipAdaptorProfile sdpGetProfile rule 1 action 4 to type sdpContent sdpContent sdpLine type variable variableValue var1
set profiles signaling sipAdaptorProfile sdpGetProfile rule 1 action 4 to sdpContent paramDelimiter ";" streamType audio streamInstanceId 1
|