Introduction
When a call is forwarded from a SIP line (B) that received a call from an original caller (A) to another destination (C), it's crucial to ensure the original caller's number (A) is displayed on the receiving end (C). This setup involves specific configurations on both the SIP trunk and the PBX system. Below is a step-by-step guide for configuring this behavior.
Aircall does not support external number / SIP Trunk And PBX. 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. Configure the following on your SIP trunk:
- 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. Follow these steps:
- 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 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.