I do have an issue with FreePBX changing my "FROM" field in the invite to German Telekom in case of call diversion. I want to send the real originator of the call in the FROM field, but Freepbx is changit it back to the trunk CID. I set "allow any CID" in the configure trunks section but this does not seem to work.
I am using Freepbx as a kind of session border controller in between my Avaya PBX and German Telekom as SIP provider. So the calls are coming from Avaya CM via Avaya SM to Asterisk and then routed to German Telekom.
INVITE sip:0xx75051645@sip.saschaxxxx.local SIP/2.0
P-AV-Message-Id: 2_1
Route: sip:192.168.1.89;lr;phase=terminating;m-type=audio
Diversion: "Sascha prv." sip:0xxxx749476@sip.saschaxxxx.local;reason=unknown;privacy=off;screen=no
P-Asserted-Identity: "Sascha SLT Wohnzimmer" sip:0yyyy6223489@sip.saschaxxxx.local
Supported: 100rel, join, replaces, sdp-anat, timer
Max-Breadth: 60
P-Charging-Vector: icid-value="AAS:2584-fe347d80e7410658c0078bce3fdb829"
Session-Expires: 1200;refresher=uac
Record-Route: sip:3923e9e@192.168.1.167;transport=udp;lr
Record-Route: sip:192.168.1.67:15060;transport=udp;ibmsid=local.1495200556906_1605392_1606059;lr;ibmdrr
Record-Route: sip:192.168.1.67:15061;transport=tls;ibmsid=local.1495200556906_1605392_1606059;lr;ibmdrr
Record-Route: sip:3923e9e@192.168.1.167;transport=tls;lr
Record-Route: sip:192.168.1.60:5061;transport=tls;lr
Min-SE: 1200
Alert-Info: cid:internal@sip.saschaxxxx.local;avaya-cm-alert-type=internal
Accept-Language: en
Contact: "Sascha SLT Wohnzimmer" sip:+58323@192.168.1.60:5061;transport=tls;avext=58323;gsid=807cfafc-5806-41e7-bc73-000c29b8fde3
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, SUBSCRIBE, NOTIFY, REFER, INFO, PRACK, PUBLISH, UPDATE
Via: SIP/2.0/UDP 192.168.1.167;rport;branch=z9hG4bK626753709840614-AP;ft=192.168.1.167~13c4
Via: SIP/2.0/UDP 192.168.1.67:15060;rport=15060;ibmsid=local.1495200556906_1605393_1606060;branch=z9hG4bK626753709840614
Via: SIP/2.0/UDP 192.168.1.67:15060;rport;ibmsid=local.1495200556906_1605392_1606059;branch=z9hG4bK463129475910819
Via: SIP/2.0/TLS 192.168.1.167;branch=z9hG4bK807d4a3458641e7bc7b0c29b8fde3-AP;ft=4;received=192.168.1.167;rport=54777
Via: SIP/2.0/TLS 192.168.1.60;branch=z9hG4bK807d4a3458641e7bc7b0c29b8fde3
Via: SIP/2.0/TCP 192.168.1.248;branch=z9hG4bK807d4a3458641e7bc7b0c29b8fde3
User-Agent: Avaya CM/R017x.00.0.441.0 AVAYA-SM-7.0.1.1.701114
From: "Sascha SLT Wohnzimmer" sip:0yyyy6223489@sip.saschaxxxx.local;tag=807d42a58641e7bc790c29b8fde3
To: sip:0xx75051645@sip.saschaxxxx.local
Call-ID: 807d423c58641e7bc7a0c29b8fde3
Max-Forwards: 66
CSeq: 1 INVITE
Content-Type: application/sdp
Content-Length: 212
Av-Global-Session-ID: 807cfafc-5806-41e7-bc73-000c29b8fde3
P-Location: SM;origlocname="saschaxxxx.local";origsiglocname="saschaxxxx.local";origmedialocname="saschaxxxx.local";termlocname="AsteriskVoIPServer";termsiglocname="AsteriskVoIPServer";smaccounting="true"
v=0
o=- 1498217060 1 IN IP4 192.168.1.60
s=-
c=IN IP4 192.168.1.248
b=AS:64
t=0 0
a=avf:avc=n prio=n
a=csup:avf-v0
m=audio 2070 RTP/AVP 8 0 127
a=sendrecv
a=rtpmap:127 telephone-event/8000
a=ptime:20
INVITE sip:0xx75051645@tel.t-online.de SIP/2.0
Via: SIP/2.0/UDP 192.168.1.89:5060;branch=z9hG4bK088d2916;rport
Max-Forwards: 70
From: "Sascha SLT Wohnzimmer" sip:0xxxx7472266@tel.t-online.de;tag=as52018363
To: sip:0xx75051645@tel.t-online.de
Contact: sip:0xxxx7472266@192.168.1.89:5060
Call-ID: 538dfffa25a33bb8150852a12fc71d9b@tel.t-online.de
CSeq: 102 INVITE
User-Agent: FPBX-AsteriskNOW-13.0.192.8(13.16.0)
Date: Fri, 23 Jun 2017 11:24:20 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Diversion: "Sascha prv." sip:0xxxx749476@192.168.1.89;reason=unknown
Content-Type: application/sdp
Content-Length: 323
v=0
o=root 1601472644 1601472644 IN IP4 192.168.1.89
s=Asterisk PBX 13.16.0
c=IN IP4 192.168.1.89
t=0 0
m=audio 5086 RTP/AVP 8 9 10 0 127
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:10 L16/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:127 telephone-event/8000
a=fmtp:127 0-16
a=ptime:20
a=maxptime:70
a=sendrecv