SIP::via

Description

This set of commands allows you to get information in the SIP via header.

Syntax

SIP::via <index>
SIP::via proto <index>
SIP::via sent_by <index>
SIP::via received <index>
SIP::via branch <index>
SIP::via maddr <index>
SIP::via ttl <index>

SIP::via <index>

  • Get SIP header “via” at index

SIP::via proto <index>

  • Get protocol part of SIP via at index, if index is not provided, the first one is returned.

SIP::via sent_by <index>

  • Get sent_by part of SIP via at index, if index is not provided, the first one is returned.

SIP::via received <index>

  • Get attribute received of SIP via at index, if index is not provided, the first one is returned.

SIP::via branch <index>

  • Get attribute branch of SIP via at index, if index is not provided, the first one is returned.

SIP::via maddr <index>

  • Get attribute maddr of SIP via at index, if index is not provided, the first one is returned.

SIP::via ttl <index>

  • Get attribute ttl of SIP via at index, if index is not provided, the first one is returned.

Examples

when SIP_RESPONSE {
  log local0. [SIP::via 0]
  SIP::header remove Via 0
  SIP::response rewrite 123 "no xxx"
}