SIP::uri

Description

Returns or sets the complete URI of the request.

Syntax

SIP::uri
SIP::uri <string>

SIP::uri

  • Returns the complete URI of the request.

SIP::uri <string>

  • Sets the URI to string. Note: The ability to set the SIP uri was added in 9.4.0.

Examples

when SIP_REQUEST {
  log local0. "uri: [SIP::uri] via [SIP::header Via 0]"
}

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