/mcprequest ANY sdp-header Audio-Attribute modify "a=inactive" "a=sendrecv"
request ANY sdp-header Audio-Connection-Info modify "0.0.0.0" "10.10.10.10"
!
! where 10.10.10.10 is CUBE's provider facing IP address
Example SIP profile to remove UPDATE method for interoperability issues.
! voice class sip-profiles 200 request ANY sip-header Allow-Header modify ", UPDATE" "" !
Example SIP Profile showing SET use within SIP profile. This is the same concept of Sets described within the voice translation-rule section.
! voice class sip-profiles 1 request ANY sip-header Contact modify "sip:(.*)@" "sip:\1@" !
Configuration IF logic and newline breaks with a SIP profile. Newline breaks are supported in SIP profiles, however, there is only one very specific use case for these. Since SIP profiles do not have any If, Then, Else logic, there is now a way to perform modifications to one header based on an input from another header. For example, an administrator only wants to modify a diversion header if the FROM header contains 1234@cisco.com. Utilizing the newline break we can spoof the IF statement within a SIP profile. See the example configuration: You match 1234 at any domain in the From header. Then you bring over the first set and add a new line break \x0D\x0AD. Finally, you add the header you want. See that this method only allows you to ADD a header. There is no way to modify another header. So this only partially meets the requirements an administrator wanted to achieve previously.
! voice class sip-profiles 1 request INVITE sip-header From modify “(.sip:1234@.)” “\1\x0D\x0ADiversion: sip:5678@example.com” !
Example of SIP profile with OR logic.
! voice class sip-profiles 123 request ANY sdp-header Audio-Attribute modify "(a=sendonly|a=recvonly|a=inactive)" "a=sendrecv" response ANY sdp-header Audio-Attribute modify "(a=sendonly|a=recvonly|a=inactive)" "a=sendrecv"