Forum Discussion

Romel_77740's avatar
Romel_77740
Icon for Nimbostratus rankNimbostratus
Jun 14, 2010

manipulating SIP request URI domain name

I need to replace the domain name of a SIP Request-URI to the local Virutal IP addr of my LTM only if domain name is xyz.com. How can I do this?

3 Replies

  • Hi Romel,

    You can use SIP::uri to retrieve and set the URI. So you could try something like this:

    
    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]]
       }
    }
    

    Aaron
  • Thanks for the reply.

     

    Your irules wiki page in many places, including setting the sip::uri, is very unclear and confusing. It mentions that sip::uri can be set but no clear description exists. This capability has existed for more than a year. What will it to update? How about giving customers the right to update? And I will put up your example in the wiki. Is the wiki intentionally not updated for some reason?

     

  • It's not "my" wiki per se--I'm not an F5 employee--but it's our wiki as users. Any logged in user can edit any of the wiki pages, so you should be able to do that now. In fact it would be great if you wanted to add an example.

     

     

    As for "official" updates to the wiki pages from F5, I'd guess it's a finite number of people on the Devcentral team and a large number of wiki pages. I think F5 also hopes users will add their real-world examples to the wiki and Codeshare for other users to reference. If there are specific pages you'd like to see updated, you could either request it in the forums or even open a case with F5 Support. Both methods lead to good results generally.

     

     

    Aaron