Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Noprint
Panel
borderColorgreen
bgColortransparent
borderWidth2

Back to Table of Contents

Back to SIP Services

Back to SIP Message Manipulation

Back to SMM Examples

Back to SDP Manipulation

Code Block
languagenone
# Sample SMM Rules to manipulate SDP content using the STORE operations
# 1) Line
# 2) Parameter

# Rule 1: store the value of "c=" line in the session block to variable var1
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 1 criterion 1 type message message messageTypes request methodTypes invite
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 1 criterion 1 type message message condition exist
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 1 criterion 2 type messageBody messageBody messageBodyType sdp condition exist
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 1 action 1 operation store type sdpContent sdpContentSubType line
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 1 action 1 from type sdpContent sdpContent streamType session sdpLine type value value "c="
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 1 action 1 to type variable variableValue var1
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 1 action 2 type header operation add headerPosition last
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 1 action 2 from type variable variableValue var1
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 1 action 2 to type header value Rule-1-Session-C-Line

# Rule 2: store the value of "a=maxptime" line in the media block to variable var2
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 2 criterion 1 type message message messageTypes request methodTypes invite
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 2 criterion 1 type message message condition exist
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 2 criterion 2 type messageBody messageBody messageBodyType sdp condition exist
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 2 action 1 operation store type sdpContent sdpContentSubType line
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 2 action 1 from type sdpContent sdpContent sdpLine type value value "a=maxptime"
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 2 action 1 from sdpContent streamType audio streamInstanceId 1
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 2 action 1 to type variable variableValue var2
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 2 action 2 type header operation add headerPosition last
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 2 action 2 from type variable variableValue var2
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 2 action 2 to type header value Rule-2-maxptime

# Rule 3: store the value of paramter "stero=" from line "a=fmtp:101" in the media block to variable var3
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 3 criterion 1 type message message messageTypes request methodTypes invite
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 3 criterion 1 type message message condition exist
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 3 criterion 2 type messageBody messageBody messageBodyType sdp condition exist
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 3 action 1 operation store type sdpContent sdpContentSubType parameter
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 3 action 1 from type sdpContent sdpContent sdpLine type value value "a=fmtp:101"
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 3 action 1 from sdpContent streamType audio streamInstanceId 1 paramName stero=
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 3 action 1 from sdpContent paramName stero= paramDelimiter ;
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 3 action 1 to type variable variableValue var3
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 3 action 2 type header operation add headerPosition last
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 3 action 2 from type variable variableValue var3
set profiles signaling sipAdaptorProfile sdpStoreProfile rule 3 action 2 to type header value Rule-3-para-stero