symtex_22198
Jul 23, 2009Nimbostratus
modify SIP contact header param
Hi,
we are using a location server which basically gets SIP invites from a SIP proxy then sends 302 redirect messages.
I have been trying to modify the IP address parameter in the Contact header which is in the 302 message. this IP address will vary, but I want to set it statically
the contact header will have a URI in the format of number xxxxxxxxxxxxx@172.24.103.10. since this is my first irule. I'm struggling.
here is what I've been trying with no success.
when SIP_RESPONSE {
set contact [ SIP::header Contact ]
set telephone 0
set bind 0
regexp {[0-9]{13}} $contact telephone
regexp {[0-9]{8}} $contact bind
SIP::header insert [format \"$bind\"
the header just returns a 0 or a 1... maybe I should try the -inline switch with regexp???