Forum Discussion
tmusella_-idt_1
Nimbostratus
Feb 01, 2016SIP URI Manipulation
Hi,
I have a case where I want to use one irule to replace anything that has xyz.com in the URI. I have 10 or so DNS names that all have 2 charcters in front of xyz.com.
How can I map aaxyz.com, bbxyz.com, ccxyz.com to the local ip? Is there a wildcard I could use in the string map?
Thanks.
when SIP_REQUEST {
Check if URI contains xyz.com if {[SIP::uri] contains "xyz.com" }{
Replace xyz.com with the VIP address
SIP::uri [string map "xyz.com [IP::local_addr]" [SIP::uri]]
} }
1 Reply
Hi Tmusella-idt,
to include
or$variables
into a[commands]
, you may try a[string map]
based syntax...[list][string map [list "aaxyz.com" [IP::local_addr] "bbxyz.com" [IP::local_addr]] [SIP::uri]]Cheers, Kai
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