Hi Stewart1, thanks for your response.
To add more ‘fringeness’, we are the direct carrier in this scenario. We have a call termination service further upstream to which we are passed all relevant headers (Remote-Party-ID) from a tier 1 carrier.
I (selectively) forward the Remote-Party-ID headers from our trunking system to ‘some’ of our FreePBX instances. Some being the systems managed by us/me.
Strictly speaking, the call detail records are logged on the trunking system and in so far as the PBX’s are concerned, they don’t require this level of detail.
The main reasons for passing the RPID header inbound is mainly due to CID pattern matching (e.g. matching on international sources) and call diversion from anonymous sources tends to completely fail without it (e.g. when an anonymous source initiates a call to our numbers and a diversion were to take place [be it a ring group or sip 301-302] the CID of anonymous is preserved but the call fails because of an absence of RPID).
Of course, with the RPID present, the call succeeds as i am forwarding it (with headers) back out via the trunk and then to the tier 1 carrier.
As for adding the blocked caller ID to a CRM record, or feed a blocked caller ID through a filter, i could achieve this with the presence of the privacy flag (or through the original CALLERPRES variable which shows as ‘prohib_not_screened’).
I have ‘fixed’ the issue in my own case by editing the functions.inc.php file under the core module and commenting out the code responsible for re-setting the CALLERPRES variable (danger notwithstanding).
I haven’t observed any adverse effects after the change.
This is now well documented internally (my systems), keeping in mind that upgrades / updates to the core module will break this, however having an option to selectively disable/enable this option in Advanced Settings would be fantastic.
I both welcome and appreciate any feedback.