Trust_id_inbound=yes But Take CallerID(Num) From From: Not From PAI

Home » Asterisk Users » Trust_id_inbound=yes But Take CallerID(Num) From From: Not From PAI
Asterisk Users 1 Comment

Hi Gang

Next Problem which occurs.

In Switzerland this is the common using form SIP Signaling:

P-Asserted-Identity: Contains the provider provided and screened phone number which is the ‘legal’ origin of the call. The origin which is to be billed for the call. If the caller has a DDI Range, this is mostly the main number of this range.

From: can contain almost anything. It can be any phone number from a DDI range, or in a call forwarding scenario, the original calling number, or if the customer has a clip-no-screening agreement just any valid phone number he is entitled to send.

Now for privacy to be correctly handled. I did this config:

On the IC endpoint: trust_id_inbound=yes

Without this, Callerid(num-pres) ist not set to ‘prohib’

On the Customer endpoint: trust_id_outbound=no

This ensures, asterisk replacing the From header with ‘anonymous’
towards the customer if privacy is set.

Unfortunately setting those variables also affect the way where the Callerid(num) variable is polulated from.

If trust_id_inbound=yes, this is set from the PAI, which is not the phone I want to display to your customer.

Is there a way to trust_id_inbound but still take Callerid(Num) from the From header?

Mit freundlichen Grüssen

-Benoît Panizzon-

I m p r o W a r e A G – Leiter Commerce Kunden

One thought on - Trust_id_inbound=yes But Take CallerID(Num) From From: Not From PAI

  • 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.