Call forwarding on SIP trunk | Original CallerID not being transmitted

There is no Vodafone documentation I’m aware of.

I’m talking to their support by eMail.

They told me, that

  1. during calls being forwarded to external numbers the PBX starts a new INVITE request
  2. The DIVERSION or PAI or CONTACT header must reflect the “Anschlussbezogene Rufnummer + Nebenstelle”.
  3. The sequence of evaluation (regarding Call Forwardings) is DIVERSION, then PAI, then CONTACT (i.e. if there’s a DIVERSION header the other two headers are not being evaluated).

To make things simpler, I asked them, if it would be sufficient to have the CONTACT header reflecting the “Anschlussbezogene Rufnummer” (i.e. disabling the generation of the DIVERSION and PAI headers in the PBX).
The answer was YES.

First I disabled the DIVERSION and PAI headers. While the PAI header is not being created having disabled it in the FreePBX WebGUI, the DIVERSION header still occurs. So, how to get rid of it?

Then we have to find a way to configure the CONTACT header to be the “Anschlussbezogene Rufnummer” (+494321987123 in my case) and call forwardings should work (according to Vodafone support).

If we cannot get rid of the DIVERSION header, we have to manipulate it to reflect the “Anschlussbezogene Rufnummer”. Doesn’t seem to be possible by WebGUI. Any idea?

Regarding the attached SIP TRACE, you can see the current state of the CONTACT and DIVERSION headers:

Lines 60 & 74 | Contact: sip:192.168.128.110:5060
[IP is the FreePBX LAN IP]

Line 75 | Diversion: sip:[email protected];user=phone;reason=unconditional
[123 is the callee’s DID]

Line 84 | Contact: sip:[email protected]:5060

Line 91 | Diversion: sip:[email protected];reason=unconditional

Line 156 | Diversion: sip:[email protected];user=phone;reason=unconditional

Obviously the reason for the failing call forwarding is: 404 Forbidden / “Authentication Failed on INVITE”:

Lines 123 - 132 | 09:14:07.940916 IP Vodafone-SIP-IP.5060 > 192.168.128.110.5060: SIP: SIP/2.0 403 Forbidden
E…z.X.XO…E…1LSIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 192.168.128.110:5060;received=188.111.57.198;branch=z9hG4bKPjaf30506b-7364-4329-8471-e8b68b887ab4;rport=5060
From: sip:[email protected];tag=a6412043-e40c-49a7-b15b-a78c80c195d4
To: sip:01701213434@*Vodafone-SIP-IP*;tag=SDjnaa299-13b7d323-001d-053f-0000-0000
Call-ID: fbaa7b38-3624-4f36-b632-8e30b4155e0e
CSeq: 579 INVITE
Server: SSW/0.0.0
Warning: 399 arcor.de " Authentication Failed on INVITE"
Content-Length: 0

tcpdump_SIP_Trace.tgz (1,8 KB)