<div dir="ltr"><div dir="ltr">On Tue, Nov 19, 2019 at 10:52 AM Benoit Panizzon <<a href="mailto:benoit.panizzon@imp.ch">benoit.panizzon@imp.ch</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Gang<br>
<br>
Next Problem which occurs.<br>
<br>
In Switzerland this is the common using form SIP Signaling:<br>
<br>
P-Asserted-Identity: Contains the provider provided and screened phone<br>
number which is the 'legal' origin of the call. The origin which is to<br>
be billed for the call. If the caller has a DDI Range, this is mostly<br>
the main number of this range.<br>
<br>
From: can contain almost anything. It can be any phone number from a<br>
DDI range, or in a call forwarding scenario, the original calling<br>
number, or if the customer has a clip-no-screening agreement just any<br>
valid phone number he is entitled to send.<br>
<br>
Now for privacy to be correctly handled. I did this config:<br>
<br>
On the IC endpoint: trust_id_inbound=yes<br>
<br>
Without this, Callerid(num-pres) ist not set to 'prohib'<br>
<br>
On the Customer endpoint: trust_id_outbound=no<br>
<br>
This ensures, asterisk replacing the From header with 'anonymous'<br>
towards the customer if privacy is set.<br>
<br>
Unfortunately setting those variables also affect the way where the<br>
Callerid(num) variable is polulated from.<br>
<br>
If trust_id_inbound=yes, this is set from the PAI, which is not the<br>
phone I want to display to your customer.<br>
<br>
Is there a way to trust_id_inbound but still take Callerid(Num) from<br>
the From header?<br></blockquote><div><br></div><div>No, there is a specific hardcoded preference order of PAI > RPID > From. It doesn't take bits and pieces from different parts to construct the final result. You'd have to see if you can do it in the dialplan using PJSIP_HEADER, if not then likely code modifications would be required.</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Joshua C. Colp<br>Digium - A Sangoma Company | Senior Software Developer<br>445 Jan Davis Drive NW - Huntsville, AL 35806 - US<br>Check us out at: <a href="http://www.sangoma.com/" target="_blank">www.sangoma.com</a> & <a href="http://www.asterisk.org/" target="_blank">www.asterisk.org</a><br></div></div></div>