I'm using the following rtpengine_offer() to force the use of ICE relay and also replace o= and m=

   rtpengine_offer("replace-origin replace-session-connection ICE=force-relay RTP");

The SDP is being updated to include an ICE relay candidate, but the IP addresses in the o= and m= lines are not changing to the servers IP address (X.X.X.X).

I also tried using the media-address parameter but that didn't change the behaviour.

When I use rtpengine_answer() then it's not providing an ICE candidate nor changing o= or m=, which I imagine is expected.

What am I missing?



INVITE from the client (before rtpengine)
------------------------------------------------------

INVITE sip:server.domain.com SIP/2.0
Via: SIP/2.0/TCP 154.20.1.8:37520;branch=z9hG4bK-1710993570;rport
From: <sip:username@server.domain.com>;tag=281751229
To: <sip:server.domain.com>
Contact: <sip:username@154.20.1.8:37520;transport=tcp>
Call-ID: c715a8f9-4dd1-38d8-acbd-54153310f59f
CSeq: 1756522847 INVITE
Content-Type: multipart/mixed;boundary=7efec5a8-3311-0157-fc8b-9af106265507
Content-Length: 1506
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER
Privacy: none
Supported: 100rel

--7efec5a8-3311-0157-fc8b-9af106265507
Content-Type: application/sdp

v=0
o=organization 1983 678901 IN IP4 154.20.1.8
s=-
c=IN IP4 154.20.1.8
t=0 0
a=tcap:1 RTP/AVPF
m=audio 15418 RTP/AVP 114 115 0 101
i=speech
a=ptime:20
a=minptime:1
a=maxptime:255
a=silenceSupp:off - - - -
a=rtpmap:114 AMR-WB/16000/1
a=imageattr:114 octet-align=0
a=fmtp:114 octet-align=0
a=rtpmap:115 AMR-WB/16000/1
a=imageattr:115 octet-align=1
a=fmtp:115 octet-align=1
a=rtpmap:0 PCMU/8000/1
a=rtpmap:101 telephone-event/8000/1
a=fmtp:101 0-16
a=pcfg:1 t=1
a=sendrecv
a=rtcp-mux
a=ssrc:2047236273 cname:e6dcab7948b70d52cd51b75e505c49eb
a=ssrc:2047236273 mslabel:6994f7d1-6ce9-4fbd-acfd-84e5131ca2e2
a=ssrc:2047236273 label:organization@audio




INVITE from the server (after rtpengine)
------------------------------------------------------


SIP/2.0 200 OK
Via: SIP/2.0/TCP 154.20.1.8:37520;branch=z9hG4bK-1710993570;rport=37520;received=2.221.73.230
From: <sip:username@server.domain.com>;tag=281751229
To: <sip:server.domain.com>;tag=0ea7681ffd64b0ffcde1bff3393fd505.ae3a
Call-ID: c715a8f9-4dd1-38d8-acbd-54153310f59f
CSeq: 1756522847 INVITE
Contact: <sip:X.X.X.X:443;transport=tcp>
Allow: INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER
Privacy: none
Content-Type: multipart/mixed;boundary=7efec5a8-3311-0157-fc8b-9af106265507
Server: kamailio (5.2.2 (x86_64/linux))
Content-Length: 1965

--7efec5a8-3311-0157-fc8b-9af106265507
Content-Type: application/sdp

v=0
o=organization 1983 678901 IN IP4 154.20.1.8
s=-
c=IN IP4 154.20.1.8
t=0 0
a=tcap:1 RTP/AVPF
m=audio 15418 RTP/AVP 114 115 0 101
i=speech
a=minptime:1
a=maxptime:255
a=silenceSupp:off - - - -
a=imageattr:114 octet-align=0
a=imageattr:115 octet-align=1
a=pcfg:1 t=1
a=rtcp-mux
a=ssrc:2047236273 cname:e6dcab7948b70d52cd51b75e505c49eb
a=ssrc:2047236273 mslabel:6994f7d1-6ce9-4fbd-acfd-84e5131ca2e2
a=ssrc:2047236273 label:organization@audio
a=rtpmap:114 AMR-WB/16000/1
a=rtpmap:115 AMR-WB/16000/1
a=rtpmap:0 PCMU/8000/1
a=rtpmap:101 telephone-event/8000/1
a=fmtp:114 octet-align=0
a=fmtp:115 octet-align=1
a=fmtp:101 0-16
a=sendrecv
a=ptime:20
a=ice-ufrag:kzgbFAnu
a=ice-pwd:hnEu9EwTrdIZnTWhYbxtmdugvr
a=candidate:dzkwmPcB28NPHfRA 1 UDP 16777215 X.X.X.X 30366 typ relay raddr X.X.X.X rport 30366
a=candidate:dzkwmPcB28NPHfRA 2 UDP 16777214 X.X.X.X 30367 typ relay raddr X.X.X.X rport 30367
a=sendrecv
a=ice-ufrag:uDE9wbvY
a=ice-pwd:dx4CcIjqUNFfnRPJEF8GjatXdU