set profiles signaling sipAdaptorProfile AddTgrpToRURI state enabled advancedSMM disabled profileType messageManipulation
#Check for tgrp in the Contact header (should be there from originatingTrunkGroupOptions includeTgrpWithIpAddress setting on IPSP)
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 1 criterion 1 type message
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 1 criterion 1 message messageTypes all
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 1 criterion 2 type header
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 1 criterion 2 header name Contact condition exist hdrInstance all
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 1 criterion 3 type parameter
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 1 criterion 3 parameter condition exist paramType userinfo name tgrp
#Store tgrp to var1
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 1 applyMatchHeader one
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 1 action 1 type parameter operation store paramType userinfo
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 1 action 1 to type variable variableValue var1 variableScopeValue local
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 1 action 1 from type parameter value tgrp
#Check for R-URI (a formality really so we can apply the action)
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 2 criterion 1 type message
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 2 criterion 1 message messageTypes all
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 2 criterion 2 type header
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 2 criterion 2 header name request-line condition exist hdrInstance all
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 2 criterion 3 variable condition not-equal-to variableID var1 value ""
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 2 criterion 3 type variable
#Add var1 (tgrp=xyz) to the R-URI
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 2 applyMatchHeader one
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 2 action 1 type parameter operation add paramType userinfo
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 2 action 1 to type parameter value tgrp
set profiles signaling sipAdaptorProfile AddTgrpToRURI rule 2 action 1 from type variable variableValue var1 |