PJSIP_RESPONSE_HEADER()
Synopsis
Gets headers of 200 response from an outbound PJSIP channel.
Description
PJSIP_RESPONSE_HEADER allows you to read specific SIP headers of 200 response from the outbound PJSIP channel.
Examples:
Example: Set 'somevar' to the value of the 'From' header
Example: Set 'via2' to the value of the 2nd 'Via' header
Example: Set 'xhdr' to the value of the 1sx X-header
Example: Usage on pre-connect handler
Syntax
PJSIP_RESPONSE_HEADER(action,name[,number])
Arguments
action
read
- Returns instance number of response header name.
name
- The name of the response header. A {} can be appended to the name to iterate over all response headers *beginning with name.number
- If there's more than 1 header with the same name, this specifies which header to read. If not specified, defaults to1
meaning the first matching header.
See Also
Import Version
This documentation was imported from Asterisk Version GIT-20-a9223f2