If you are reading a PDF document, refer to the online documentation to view examples.
# 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
# Rule 2 Action 1: store codec position for codec "PCMA/8000" to var3
# Rule 2 Action 2: add new header Codec-PCMA-Pos with value from var3
set profiles signaling sipAdaptorProfile sdpGetProfile rule 2 criterion 1 type message message messageTypes request methodTypes invite
set profiles signaling sipAdaptorProfile sdpGetProfile rule 2 criterion 1 type message message condition exist
set profiles signaling sipAdaptorProfile sdpGetProfile rule 2 criterion 2
type messageBody messageBody messageBodyType sdp condition exist
set profiles signaling sipAdaptorProfile sdpGetProfile rule 2 criterion 3 type sdpContent sdpContent codecNames PCMA/8000 condition exist
set profiles signaling sipAdaptorProfile sdpGetProfile rule 2 criterion 3 type sdpContent sdpContent streamType audio streamInstanceId 1
set profiles signaling sipAdaptorProfile sdpGetProfile rule 2 action 1 type sdpContent operation getCodecPosition sdpContentSubType codecByName
set profiles signaling sipAdaptorProfile sdpGetProfile rule 2 action 1 from type sdpContent sdpContent streamType audio streamInstanceId 1 codecNames "PCMA/8000"
set profiles signaling sipAdaptorProfile sdpGetProfile rule 2 action 1 to type variable variableValue var3
set profiles signaling sipAdaptorProfile sdpGetProfile rule 2 action 2 type header operation add headerPosition last
set profiles signaling sipAdaptorProfile sdpGetProfile rule 2 action 2 from type variable variableValue var3
set profiles signaling sipAdaptorProfile sdpGetProfile rule 2 action 2 to type header value Codec-PCMA-Pos