I have added the following lines to my dialplan:

exten => _XXXXXXXXXX,7,SipAddHeader(P-Asserted-Identity: <sip\:${CALLERIDNUM}\@${MAX-3662}>) 
exten => _XXXXXXXXXX,8,Dial(SIP/${EXTEN}@${MAX-3662})

The asterisk console shows the SipAddHeader line and a SIP debug shows it as well. However, running a wireshark trace, filtering on 5060, I do not see the header at all. Is this a bug in Asterisk where it isn’t capable of actually sending that SIP header?

St this
in sip.conf
sendrpid = yes
trustrpid = no

Dial function that you described is ok but try without that max term
Also make follwing command to check this application
Show application SipAddHeader
& check wthere this application on ur Asterisk


What you suggested is for Remote Party ID, not SipAddHeader. The “max term” expands to the IP address of our SIP gateway, so it is necessary.

The version of Asterisk I run supports SipAddHeader - if it didn’t, it would choke on it immediately.