Adding SIP Headers in v1.4

We are trying to achieve this with Asterisk 1.4:

voip-info.org/wiki/view/P-As … -ID+header

But SipAddHeader appears to be deprecated and not working. While the new facility appears to be read only:

voip-info.org/wiki/index.php … sip_header

How do we add this SIP header in v1.4?

Hi Are you sure its depreciated ? as no mention in 1.4.21.1 of it being so.

and I use it on all systems to set the ring cadence of sets and its working fine.

[code] -= Info about application ‘SIPAddHeader’ =-

[Synopsis]
Add a SIP header to the outbound call

[Description]
SIPAddHeader(Header: Content)
Adds a header to a SIP call placed with DIAL.
Remember to user the X-header if you are adding non-standard SIP
headers, like “X-Asterisk-Accountcode:”. Use this with care.
Adding the wrong headers may jeopardize the SIP dialog.
Always returns 0

[/code]

Ian

Can try to set it directly, not sure if this is supported, but should work.

exten => s,n,Set(_SIPADDHEADER01=P-Asserted-Identity: <sip:${CALLERID(num)}>)

What we are ultimately trying to do is send this to the Avaya via the SES component to get it to populate CLID to the PSTN.

Still doing some testing, thanks!

We use P-Asserted headers when sending calls to MCI. Here’s code that works for us and we’ve used this for both 1.2 and 1.4. The ${MCI-SIP} expands to an IP address on MCI’s network. This is a snip from an outbound configuration for a particular customer; we use asterisk for a hosted PBX service. One day it will all be stored in MySQL…sigh.


send ld through mci
exten => _1XXXXXXXXXX,1,Set(CALLERID(all)=TTI <+19999999999>)
exten => _1XXXXXXXXXX,n,SipAddHeader(P-Asserted-Identity: "TTI" <sip:${CALLERID(num)}\@${MCI-SIP}\>)
exten => _1XXXXXXXXXX,n,Dial(SIP/${EXTEN:1}@${MCI-SIP},,r)
exten => _1XXXXXXXXXX,n,Hangup()

We did a ‘sip debug’ and see that it is indeed adding the header, so it appears Asterisk is doing its thing. Just need to figure out the Avaya side now…