FreePBX changing "FROM" field

Hey guys

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.

Here is the Invite I am sending to Asterisk (traced with tshark on the Freepbx):

[spoiler]INVITE sip:[email protected] 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:[email protected];reason=unknown;privacy=off;screen=no
P-Asserted-Identity: “Sascha SLT Wohnzimmer” sip:[email protected]
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:[email protected];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:[email protected];transport=tls;lr
Record-Route: sip:192.168.1.60:5061;transport=tls;lr
Min-SE: 1200
Alert-Info: cid:[email protected];avaya-cm-alert-type=internal
Accept-Language: en
Contact: “Sascha SLT Wohnzimmer” sip:[email protected]: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:[email protected];tag=807d42a58641e7bc790c29b8fde3
To: sip:[email protected]
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
[/spoiler]

And this is what Asterisk is sending to my provider:

[spoiler]INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.1.89:5060;branch=z9hG4bK088d2916;rport
Max-Forwards: 70
From: “Sascha SLT Wohnzimmer” sip:[email protected];tag=as52018363
To: sip:[email protected]
Contact: sip:[email protected]:5060
Call-ID: [email protected]
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:[email protected];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
[/spoiler]

What do I need to do that Asterisk keeps my from field as it was originally?
I need to use that - hopefulle German Telekom supports that - to tunnel the real calling number in case of call diversions.

TIA
Cheers

Found a solution on my own…

If I remove the “fromuser” entry in trunk config, Asterisk is passing out the FROM field as it was sent to it. But German Telekom does not seem to support that, I get a forbidden… :frowning:

Will call them and raise a ticket. Maybe that helps.

Cheers