Jonas
This is how we are doing it.
exten => s,n,SipAddHeader(P-Asserted-Identity:
<:${siteDefaultCIDNumber}>)
exten =>
s,n,GosubIf($["${gbl_CallPrivacy}"="id"]?rfc-3325-CPN,1)
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,SetCallerPres(prohib_not_screened) ; this might
not be needed --- needs further testing
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()
Good Luck
Bryant Zimmerman (ZK Tech Inc.)
616-855-1030 Ext. 2003 Good LuckBryant Zimmerman (ZK Tech Inc.)616-855-1030
Ext. 2003
----------------------------------------
From: "Jonas Kellens" <jonas.kellens at telenet.be>
Sent: Wednesday, January 05, 2011 9:44 AM
To: "Asterisk Users Mailing List - Non-Commercial Discussion"
<asterisk-users at lists.digium.com>
Subject: [asterisk-users] Add Privacy: id to SIP-invite
Hello list,
is it possible to add the field Privacy: id to a SIP INVITE message ?
INVITE sip:32444666600 at 1.2.3.4:5060 SIP/2.0
Via: SIP/2.0/UDP1 .2.3.4:5060
From: "R3211133333" <sip:3211133333 at 1.2.3.4>;tag=2096790244
To: <sip:32444666600 at 1.2.3.4>
Call-ID: 3b040826e909d311880a0090330605a0 at 192.168.12.40
CSeq: 34677 INVITE
Contact: <sip:32444666600 at 1.2.3.4:5060>
Allow:
REGISTER,SUBSCRIBE,NOTIFY,INVITE,ACK,PRACK,OPTIONS,BYE,CANCEL,REFER,INFO,UPD
ATE
Content-Length: 203
Content-Type: application/sdp
Max-Forwards: 69
Supported: replaces,answermode,100rel
User-agent: (innovaphone IP800/6.00 sr2-hotfix16 [09-60901.35/424/110])
Privacy: id
How can I do this in the Asterisk dialplan ?? SIPAddHeader ??
Kind regards,
Jonas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.digium.com/pipermail/asterisk-users/attachments/20110105/9e0eb04a/attachment.htm>