When a call is forwarded from a SIP line B that received a call from an original caller A to another destination C, it is important to ensure that the original caller's number A is displayed on the receiving end C. This behavior depends on specific configurations on both the SIP trunk and the PBX system.
Important: Aircall does not support external numbers, SIP trunks, or PBX systems. This article is for technical information.
Configuration
1. SIP trunk configuration
To ensure that the original caller A number is retained during forwarding, your SIP provider must support and allow the use of the Diversion Header or P-Asserted-Identity (PAI) for call redirection.
Enable CLI
- Ensure your SIP trunk is configured to support CLI (Calling Line Identification) presentation.
- Confirm with your SIP provider that they allow the forwarding of external caller IDs.
Diversion Header configuration
- The Diversion Header contains the details of the forwarding party B.
- Ensure your SIP provider supports the Diversion Header and that it is correctly formatted.
Example of a Diversion Header:
Diversion: <sip:+1234567890@domain.com>;reason=unconditional
P-Asserted-Identity (PAI)
- Use the PAI to pass the original caller's number A to the forwarded destination C.
- Confirm the configuration includes:
P-Asserted-Identity: <sip:+1122334455@domain.com>
Update SIP signaling
- Ensure From and Contact headers in the SIP INVITE contain the original caller's number.
Example SIP INVITE:
From: <sip:+1122334455@domain.com> To: <sip:+33444555666@domain.com>
Outbound caller ID policies
- Check if your SIP trunk requires specific caller ID configurations for forwarded calls.
- Ensure no restrictions are in place for transmitting the original caller ID A.
2. PBX configuration
The PBX system plays a critical role in ensuring that the original caller ID A is passed through during forwarding.
Enable call forwarding rules
- Configure call forwarding rules in the PBX to pass the original caller ID A.
- Example rule:
"If a call to extension B is forwarded to C, display A's number on C."
Manipulate SIP headers
- Ensure the PBX modifies SIP headers correctly to retain A's number.
- Adjust settings to include the original caller ID in the From header.
Diversion Header support
- Enable the Diversion Header in the PBX settings for call forwarding scenarios.
Example configuration in Asterisk (extensions.conf):
exten => _X.,1,Set(DIVERSION=<sip:+1234567890@domain.com>) exten => _X.,n,Dial(SIP/C,300,D)
Set caller ID for forwarded calls
- Configure the PBX to set the original caller ID A explicitly for forwarded calls.
Example configuration in FreePBX:
- Navigate to Advanced Settings.
- Enable Send Original Caller ID for Forwarded Calls.
Handle PAI and RPID
- Configure the PBX to pass the PAI (P-Asserted-Identity) or Remote-Party-ID (RPID).
Example configuration in Asterisk (sip.conf):
[general] sendrpid=yes trustrpid=yes
Test the configuration
- Make a test call from A to B and verify that the original caller ID A appears when the call is forwarded to C.
Key considerations
- SIP provider support: Always confirm with your SIP provider that they support passing the original caller ID for forwarded calls.
- Compliance: Ensure your configuration complies with local telecommunications regulations regarding caller ID presentation.
- Network configuration: Verify that firewalls or Session Border Controllers (SBCs) do not interfere with SIP headers.
- Testing: Test the setup thoroughly after making changes to ensure the original caller ID is displayed correctly.
By following these steps, you can ensure that the original caller's number A is displayed when calls are forwarded through your SIP trunk and PBX system to your Aircall numbers. If issues persist, consult with your SIP provider or PBX vendor for additional troubleshooting.