Upgrade 3CX to v18 and get it hosted free!

Asterisk cmd SIPGetHeader

Author image

SIPGetHeader()

SIPGetHeader is deprecated, use the * Asterisk func sip_header instead.

With this app, you can pick any header from an incoming invite and
stuff it into a channel variable. It is a generic way of supporting any header
a vendor or service provider may add that you want to use in your dial
plan.

See bug 2838 – introduced for/in Asterisk 1.1

Details

SIPgetheader() takes any sip header from the incoming INVITE and adds it to a variable. This can be done in the dial plan with any header.

SIPaddheader() adds a SIP header. Of course, you need to know what you do with this function. You can add any header of your own, that you need to communicate with another node. One thing you could do in an Asterisk network is add the account code to the INVITE… You can not replace SIP headers with this function, only add new ones. Remember: If you add non-standard headers, prefix them with “x-“, like in e-mail.

Asterisk 1.4: This appears to have been removed, use SIP_HEADER

Example

_X.,7,SIPGetHeader(Var_TO=To)

header To: will be stored in variable named Var_TO

See also


Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.