Thank you Philipp for your help.

I ran into this problem: When I change the CALLERID(num and name) to 
anonymous, they are also changed in the RPID line and not only in the From.

This is the script:
exten => _*67.,1,SIPAddHeader(Privacy: id);
exten => _*67.,2,Set(CALLERPRES()=prohib_passed_screen);
exten => _*67.,3,SIPAddHeader(P-Asserted-Identity: 
<sip:${CALLERID(num)}[email protected]:5060>);
exten => _*67.,4,Set(CALLERID(num)=anonymous)
exten => _*67.,5,Set(CALLERID(name)=Anonymous);
exten => _*67.,6,Dial(SIP/${EXTEN:[email protected])

... and this is the result:
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.10.10.20:5060;branch=z9hG4bK3031c135
Max-Forwards: 70
From: "Anonymous" <sip:[email protected]>;tag=as6d95f136
To: <sip:[email protected]>
Contact: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 102 INVITE
User-Agent: Asterisk-PBX
Remote-Party-ID: "Anonymous" 
<sip:[email protected]>;privacy=full;screen=yes
Date: Tue, 28 Jul 2009 09:00:20 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
P-Asserted-Identity: <sip:[email protected]:5060>
Privacy: id


-------- Original Message  --------
Subject: Re: [asterisk-users] INVITE Privacy Information
From: Philipp Kempgen <[email protected]>
To: Asterisk Users Mailing List - Non-Commercial Discussion 
<[email protected]>
Date: Monday, 27 July, 2009 17:16:45

> Cyprus VoIP schrieb:
>> I would like to use Asterisk to add/modify SIP headers in the INVITE 
>> message, to include Privacy information, if the INVITE includes a *67 
>> prefix (or another predefined prefix).
>>
>> That's an example of the INVITE I get:
>> /INVITE sip:*[email protected] SIP/2.0
>> From: "123456789"<sip:*[email protected]>;tag=333333333
>> To: <sip:*[email protected]>
>> /
>> These are the sip headers I need to add to the INVITE:
>> /P-Asserted-Identity: <sip:*[email protected]:5060>
> 
> SIPAddHeader(P-Asserted-Identity: <sip:....@...>);  // RFC 3325
> 
>> Remote-Party-ID: 
>> <sip:*[email protected]:5060>;party=calling;screen=yes;privacy=full
> 
> Enable
> sendrpid=yes                 ; If Remote-Party-ID should be sent
> in the [general] section in sip.conf.
> SetCallerPres(prohib_passed_screen);
> 
>> Privacy: id/
> 
> SIPAddHeader(Privacy: id);  // RFC 3325, RFC 3323
> 
>> And I need to change the "From" to 
>> "/"Anonymous"<sip:[email protected]>/" and to remove the "*67" 
>> prefix from the "INVITE" and "To" lines.
> 
> Set(CALLERID(num)=anonymous);  // RFC 2543
> Set(CALLERID(name)=Anonymous);
> 
> 
>     Philipp Kempgen

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to