thanks a lot for your explanation.
Our provider is Vodafone and they explained that they do support the arbitrary caller ID.
They also explained, that they use the “From user” option for the CID transmission and the P-Asserted-Identity.
You have to configure your SIP header so that the fields “Contact”, “From” and “To”, respectively, meet the format +email@example.com, where +49 is your country code (Germany), 4321 is your area code and 998877 is the number of your SIP trunk. Or the format firstname.lastname@example.org, where 04321 is your area code.
So, in the SIP trunk configuration of FreePBX webinterface, I filled the field “From user” and the field “Contact user” at pjsip Settings > Advanced with email@example.com.
I cannot identify the “To” field mentioned by Vodafone in the FreePBX webinterface. Do you know where to find it?
On the “Advanced” tab of pjsip Settings, I also selected at “Send RPID/PAI” the option “Send P-Asserted-Identity header”. Vodafone told me that you have to assemble the PAI of the area code, the SIP trunk number and the DID. Unfortunately, in FreePBX webinterface you can only enable or disable the PAI option, but you cannot define the PAI number. BTW the notation Vodafone requires doesn’t make sense to me, because if you define also the DID, there will be sent always this hard-coded number and not the DID of the appropriate caller, or not?
Further Caller ID settings are at trunk configuration > General at Outbound CallerID. This is set to <04321998877>
The “CID Option” below is set to “Allow Any CID”.
At “Outbound Routes” > Route settings the field “Route CID” is left blank, the option “Override Extension” is set to “No”.
Finally the configuration of the extensions include at “General” Outbound CID the format 04321998877123, where 123 is my extension.
The extension’s tab “Advanced” offers the option “Send RPID” which is set to “Send P-Asserted-Identity header”.
I changed the Caller ID setting in the extension’s configuration - as you proposed to do - to a different number, which doesn’t match my correct number (04321998877123). I guess it is meant to test, if the provider transmits any CID and not only CIDs from within your SIP trunk number range.
The result is a voice saying that “all circuits are busy now”.