Please check INVITE message from the
sbc-ext.5060 > provider.5060Here no Record-Route header present
06:42:30.210381 IP (tos 0x60, ttl 64, id 3430, offset 0, flags [none], proto UDP (17), length 1377)
sbc-ext.5060 > provider.5060: [udp sum ok] SIP, length: 1349
INVITE sip:972xxxxxxx@xxxxxxxxxxx:5060 SIP/2.0
Via: SIP/2.0/UDP xxxxxxxxxxxxxxx;branch=z9hG4bK2eca.40a7054ddf5f0d12a23adbd4f8f501b8.0
X-OIP: 192.168.2.2
X-SBC-Check: accepted
Max-Forwards: 68
From: "Dustin Marquess" <sip:214xxxxxxx@sbc.xxx.net>;tag=rm74ep7yFm4mm
To: <sip:972xxxxxxx@sbc.xxx.net>
Call-ID: 68dc6b49-cc32-123e-f9a0-f72abab18dff
CSeq: 100863083 INVITE
User-Agent: FreeSWITCH
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 327
X-FS-Support: update_display,send_info
Remote-Party-ID: "Dustin Marquess" <sip:214xxxxxxx@xxx.net>;party=calling;screen=yes;privacy=off
X-Group-SBC: 1001
X-Routing-SBC: tr2un
Contact: <sip:btpsh-685b9a1a-a0c-1@xxxxxxxxxxxxxxx>
And please check "180 Ringing" from sbc-int.5060 > pbx.5080
06:42:31.265799 IP (tos 0x60, ttl 64, id 39495, offset 0, flags [none], proto UDP (17), length 994)
sbc-int.5060 > pbx.5080: [udp sum ok] SIP, length: 966
SIP/2.0 180 Ringing
From: "Dustin Marquess" <sip:214xxxxxxx@sbc.xxx.net>;tag=rm74ep7yFm4mm
To: <sip:972xxxxxxx@sbc.xxx.net>;tag=gK0aa84cd5
Call-ID: 68dc6b49-cc32-123e-f9a0-f72abab18dff
CSeq: 100863083 INVITE
Contact: <sip:xxxxxxxxxxx:5060;did=19d.2a212d95;transport=udp;alias=xxxxxxxxxxx~5060~1>
Allow: INVITE,ACK,CANCEL,BYE,INFO,PRACK,OPTIONS
l: 220
Content-Disposition: session; handling=required
c: application/sdp
Via: SIP/2.0/UDP 192.168.2.2:5080;received=192.168.2.2;rport=5080;branch=z9hG4bKrS9aSHDy40v8S
Record-Route: <sip:xxxxxxxxxxxxxxx;r2=on;lr;ftag=rm74ep7yFm4mm;proxy_media=yes;nat=yes>,<sip:192.168.2.3;r2=on;lr;ftag=rm74ep7yFm4mm;proxy_media=yes;nat=yes>
P-SR-XBranch: z9hG4bK2eca.40a7054ddf5f0d12a23adbd4f8f501b8.0
Here is added Record-Route headers but this headers is not present on the same message from the provider.
Looks like "record_route()" called on reply route, but this is not possible according function decscription
https://www.kamailio.org/docs/modules/devel/modules/rr.html#rr.f.record_route
You need:
1) to make sure record_route() called during INVITE processing;
2) try find reason why Record-Route headers added durirng "180 RInging" processing.