Forum Discussion
symtex_22198
Nimbostratus
Jul 23, 2009modify 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 paramet...
symtex_22198
Nimbostratus
Jul 23, 2009within a 302 SIP message is a "Contact" field
The contact field will contain the redirected telephone in the format of a uri like this
Contact: "16601003"
I only need to replace the IP address, which will vary with every 302 from the server. I want to set it statically to an IP address I want.
at first I tried to use UDP::payload and replace the hex values using the offset, but the offset varies too... so now I'm trying it this way... let me repost the the irule there are some small details missing...
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 remove Contact
SIP::header insert [format \"$bind\"
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
