[asterisk-users] SIPAddHeader not working

Andrew Thomas andy at datavox.co.uk
Mon Mar 14 08:48:23 CDT 2011


Try:

SIPAddHeader(P-Preferred-Identity: <sip:${CALLERID(ANI)};user=phone>)
SIPAddHeader(Privacy: id)

That works for me in the UK.


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Jonas
Kellens
Sent: 11 March 2011 15:06
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] SIPAddHeader not working


Hello,

does anyone have a SIP trace for me where the SIPheader "Privacy: id" is
present ?? If so, what Asterisk version ?


Kind regards,
Jonas.


On 03/09/2011 06:43 PM, Bryant Zimmerman wrote: 
Jonas

In my systems I have seen the Privacy: id when we do our testing but it
has been several months since I have checked it. I am running some tests
later today with one of our customers and I will enable it and do a
capture to confirm but when we do a CID block our vendors say they are
getting the headers correctly 


Thanks

Bryant Zimmerman (ZK Tech Inc.)
616-855-1030 Ext. 2003




From: "Jonas Kellens" <jonas.kellens at telenet.be>
Sent: Wednesday, March 09, 2011 9:18 AM
To: bryantz at zktech.com, "Asterisk Users Mailing List - Non-Commercial
Discussion" <asterisk-users at lists.digium.com>
Subject: Re: [asterisk-users] SIPAddHeader not working

On 03/09/2011 02:09 PM, Bryant Zimmerman wrote: 


From: "Jonas Kellens" <jonas.kellens at telenet.be>
Sent: Wednesday, March 09, 2011 4:18 AM
To: "Asterisk Users Mailing List - Non-Commercial Discussion"
<asterisk-users at lists.digium.com>
Subject: [asterisk-users] SIPAddHeader not working

Hello list,

I notice that the dialplan method SIPAddHeader is not working :

in dialplan :

exten => s,n,SIPAddHeader(Privacy: id)


in SIP invite no trace of this header :


Using Asterisk 1.6.2.16.1


How do I correctly add the Privacy header ?!


Kind regards,
Jonas.

Jonas

Here is the way we add the rfc-3325 privacey header so our vendors pick
it up correctly. This is what we use in 1.6.x and 1.8.x
When I check on my versions the privacy header appears to be there.


exten => rfc-3325-CPN,1,NoOp(Set Call Privacy)
exten => rfc-3325-CPN,n,NoOp(From ${SIP_HEADER(From)})
exten => rfc-3325-CPN,n,NoOp(To ${SIP_HEADER(To)})
exten =>
rfc-3325-CPN,n,Set(l_sipheaderfromip=${CUT(SIP_HEADER(From),@,2)})
exten => rfc-3325-CPN,n,GotoIf($["${l_sipheaderfromip}" != ""]?hasat)
exten =>
rfc-3325-CPN,n,Set(l_sipheaderfromip=${CUT(CUT(SIP_HEADER(From),>,1),:,2
)})
exten => rfc-3325-CPN,n,Goto(gotip)
exten =>
rfc-3325-CPN,n(hasat),Set(FROM_IP=${CUT(CUT(CUT(SIP_HEADER(From),@,2),>,
1),:,1)})
exten => rfc-3325-CPN,n(gotip),NoOp(Gateway IP is ${FROM_IP})
exten =>
rfc-3325-CPN,n,SIPAddHeader(P-Preferred-Identity:"${CALLERID(name)}"
<sip:+1${CALLERID(num)}@${FROM_IP}\;user=phone>) 
exten => rfc-3325-CPN,n,SIPAddHeader(Privacy: id) 
exten => rfc-3325-CPN,n,Set(CALLERPRES()=prohib_not_screened)
exten => rfc-3325-CPN,n,Set(CALLERID(num)=Anonymous) 
exten => rfc-3325-CPN,n,Set(CALLERID(name)=Anonymous) 
exten => rfc-3325-CPN,n,Return() 

I see no great difference. What does
"Set(CALLERPRES()=prohib_not_screened)" do ?

How does your INVITE look like ? Does the header "Privacy: id" appears ?
Because it does not in my INVITE. 


Kind regards,
Jonas.


 If you have received this communication in error we would appreciate
you advising us either by telephone or return of e-mail. The contents
of this message, and any attachments, are the property of DataVox,
and are intended for the confidential use of the named recipient only.
If you are not the intended recipient, employee or agent responsible
for delivery of this message to the intended recipient, take note that
any dissemination, distribution or copying of this communication and
its attachments is strictly prohibited, and may be subject to civil or
criminal action for which you may be liable.
Every effort has been made to ensure that this e-mail or any attachments
are free from viruses. While the company has taken every reasonable
precaution to minimise this risk, neither company, nor the sender can
accept liability for any damage which you sustain as a result of viruses.
It is recommended that you should carry out your own virus checks
before opening any attachments. 

Registered in England. No. 27459085.





More information about the asterisk-users mailing list