Have adopted doing record_route function call in
t_on_branch()-installed branch_route, and nowhere else.
But there's still an issue with TLS & WS calls: double RR header is
not added, but just single one, with no transport= attribute.
Here's how such problematic INVITEs look like (TLS -> kamailio -> WS):
INVITE sip:4vla69uq@vh5t9smqs0hi.invalid;transport=ws SIP/2.0
Record-Route: <sip:webrtcloadtest.intersog.com;lr=on;did=9c6.883;nat=yes>
Via: SIP/2.0/WSS
webrtcloadtest.intersog.com:10443;branch=z9hG4bK9432.dcd630362f4d26bf5b1bd6e96a9b8f99.0;i=c
Via: SIP/2.0/TLS
192.168.7.142:32924;received=78.26.144.10;branch=z9hG4bK.4XlJuRMft;rport=32924
From: <sip:666@webrtcloadtest.intersog.com>;tag=zUKDUOuaO
To: sip:999@webrtcloadtest.intersog.com
CSeq: 21 INVITE
Call-ID: Fv0UICI2wn
Max-Forwards: 69
Supported: outbound
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
SUBSCRIBE, INFO, UPDATE
Content-Type: application/sdp
Content-Length: 1714
Contact:
<sip:666@78.26.144.10:32924;transport=tls;alias=78.26.144.10~32924~3>;+sip.instance="<urn:uuid:a0668e48-be71-438c-85d5-750f422dfc55>"
User-Agent: LinphoneAndroid/2.4.1-19-g10566fa (belle-sip/1.4.1)
And this is how messages of inverse direction look like, when
received, and they are good (TCP -> kamailio -> WS):
INVITE sip:4vla69uq@vh5t9smqs0hi.invalid;transport=ws SIP/2.0
Record-Route:
<sip:webrtcloadtest.intersog.com;transport=ws;r2=on;lr=on;did=575.b8e;nat=yes>
Record-Route:
<sip:webrtcloadtest.intersog.com;transport=tcp;r2=on;lr=on;did=575.b8e;nat=yes>
Via: SIP/2.0/WSS
webrtcloadtest.intersog.com:10443;branch=z9hG4bK3f1b.39a33d9eb24136c53d32abbe70db654a.0;i=1
Via: SIP/2.0/TCP
192.168.7.142:41932;received=78.26.144.10;branch=z9hG4bK.uxsEm71or;rport=41932
From: <sip:666@webrtcloadtest.intersog.com>;tag=Xxq5fv9lC
To: sip:999@webrtcloadtest.intersog.com
CSeq: 21 INVITE
Call-ID: RCYQTYzQlO
Max-Forwards: 69
Supported: outbound
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
SUBSCRIBE, INFO, UPDATE
Content-Type: application/sdp
Content-Length: 1714
Contact:
<sip:666@78.26.144.10:41932;transport=tcp;alias=78.26.144.10~41932~2>;+sip.instance="<urn:uuid:a0668e48-be71-438c-85d5-750f422dfc55>"
User-Agent: LinphoneAndroid/2.4.1-19-g10566fa (belle-sip/1.4.1)
--
Andrey Utkin