Gets the specified SIP header from an incoming INVITE message.
Since there are several headers (such as Via) which can occur multiple times, SIP_HEADER takes an optional second argument to specify which header with that name to retrieve. Headers start at offset
This function does not access headers from the REFER message if the call was transferred. To obtain the REFER headers, set the dialplan variable
GET_TRANSFERRER_DATA to the prefix of the headers of the REFER message that you need to access; for example,
X- to get all headers starting with
X-. The variable must be set before a call to the application that starts the channel that may eventually transfer back into the dialplan, and must be inherited by that channel, so prefix it with the
__ when setting (or set it in the pre-dial handler executed on the new channel). To get all headers of the REFER message, set the value to
*. Headers are returned in the form of a dialplan hash TRANSFER_DATA, and can be accessed with the functions
HASHKEYS(TRANSFER_DATA) and, e. g.,
Please also note that contents of the SDP (an attachment to the SIP request) can't be accessed with this function.
number- If not specified, defaults to
This documentation was imported from Asterisk Version GIT-18-3330764