On 03/09/2011 02:09 PM, Bryant Zimmerman wrote:
------------------------------------------------------------------------
*From*: "Jonas Kellens" <[email protected]>
*Sent*: Wednesday, March 09, 2011 4:18 AM
*To*: "Asterisk Users Mailing List - Non-Commercial Discussion"
<[email protected]>
*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.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users