UDP::client_port

Description

Returns the UDP port/service number of the client system. This command is equivalent to the command clientside { UDP::remote_port }.

Syntax

UDP::client_port

UDP::client_port

  • Returns the UDP port/service number of the client system.

Examples

when CLIENT_DATA {
  if { [UDP::payload 50] contains "XYZ" } {
    pool xyz_servers
    persist uie "[IP::client_addr]:[UDP::client_port]" 300
  } else {
    pool web_servers
  }
}

when SIP_REQUEST {
  SIP::header insert "Via" "[lindex [split [SIP::via 0] ";"] 0]received=[IP::client_addr]rport=[UDP::client_port][lindex [split [SIP::via 0] ";"] 1]"
  SIP::header remove "Via" 1
}