I am trying to modify/change parameters in the SIP message. Was able to successfully modify the Originator "o" field and VIA field in the SIP messages using the below commands on the CUBE. The change i wanted to do was to replace the IP address in these fields.
voice class sip-profiles 1
rule 1 request ANY sdp-header Session-Owner modify "1.1.1.1" "2.2.2.2"
rule 2 response ANY sdp-header Session-Owner modify "1.1.1.1" "2.2.2.2"
rule 3 request ANY sip-header VIA modify "1.1.1.1" "2.2.2.2"
rule 4 response ANY sip-header VIA modify "1.1.1.1" "2.2.2.2"
However, when I am trying to modify the ip address in the "From" field of the INVITE/REINVITE/OPTIONS/NOTIFY messages it does NOT seem to take effect. Here is what i am adding
voice class sip-profiles 1
rule 5 request INVITE sip-header From modify "<sip:(.*)@(.*)>" "<sip:\1@2.2.2.2>"
rule 6 request REINVITE sip-header From modify "<sip:(.*)@(.*)>" "<sip:\1@2.2.2.2>"
rule 7 request OPTIONS sip-header From modify "<sip:(.*)@(.*)>" "<sip:\1@2.2.2.2>"
rule 8 request NOTIFY sip-header From modify "<sip:(.*)@(.*)>" "<sip:\1@2.2.2.2>"
Any suggestions?