Forwarding private caller ID to another Asterisk server

We receive calls from our SIP provider to a central gateway server, which then sends the call on to individual client PBXs. In the case where our provider marks a number private, we would like our gateway to be able to pass the number on to the PBX, which could then block it for the end user. At the moment, it looks like Asterisk refuses to forward the CID.

Here is a sample call from our provider, note the number 6825559221 is included, but the Privacy header is set on the invite. We’d like to be able to pass that CID number (and the Privacy header) to the next server. Is there anything we can add to the dialplan to do this?

INVITE sip:2925553448@ SIP/2.0
Organization: Metaswitch Networks
Max-Forwards: 67
Session-Expires: 3600
Min-SE: 600
Supported: timer, 100rel
To: <sip:2925553448@>
From: "Anonymous" <sip:6825559221@>;tag=3699629103-617126
P-Asserted-Identity: "Anonymous" <sip:6825559221@>
Privacy: id

What version of Asterisk are you using and which SIP channel driver? If it’s chan_pjsip then you should set “trust_id_outbound” and “trust_id_inbound” to yes on the endpoint.

1 Like

Still using Asterisk 11 and chan_sip. but I see trust_id_outbound is also available there. I assume it does the same thing? Thanks for the tip.

It should, but I have not used it there.