Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] RTP_RELAY, incorrect flags sent for caller on rtp_relay_offer, worked previously in 3.4.x #3582

Open
RobWMoore opened this issue Feb 11, 2025 · 0 comments

Comments

@RobWMoore
Copy link

rtp_relay_change_3.4.6_to_3.5.3.diff.txt

OpenSIPS version you are running

version: opensips 3.5.3 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: 051e1c4cc
main.c compiled on  with gcc 12

issue was not present on the following version:

version: opensips 3.4.6 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: ab10b6892
main.c compiled on  with gcc 12

Describe the bug

previously, opensips compiled at v3.4.6, when using the following config file code works as expected in an edge proxy to manage an Inbound Invite and the 200 ok SDP.

	$avp(rtp_relay_flags) = "RTP/AVP ICE=remove in-iface=external out-iface=internal";                                     # << flags set for the inbound invite.
	$avp(rtp_relay_peer_flags) = "RTP/AVP ICE=remove in-iface=internal out-iface=external media-address=18.100.100.121";   # << flags set for the oubound 200 OK.


	$rtp_relay(flags) = $avp(rtp_relay_flags);			# << flags set for the inbound invite.
	$rtp_relay(peer) = $avp(rtp_relay_peer_flags);		# << flags set for the oubound 200 OK. (also tried setting $rtp_relay_peer(flags) with same result )
	

	$rtp_relay_ctx(callid) = $avp(rtpe_callid);
	$rtp_relay_ctx(from_tag) = $ft;

	rtp_relay_engage("rtpengine");

When upgrading to V 3.5.3, the flags being passed to RTP Engine are incorrect when both $rtp_relay(flags) and either $rtp_relay_peer(flags)or $rtp_relay(peer) is set.
The flags values set in $rtp_relay_peer(flags)/$rtp_relay(peer) are used in rtp_relay_offer not the flags values set in $rtp_relay(flags).

Maybe our config code has always been wrong but it seems correct when reviewing the documentation.

Example System Logs

on 3.5.3 we can see incorrect rtp_relay_offer flags being sent.

Feb 11 13:49:17 [57] DBG:rtp_relay:rtp_relay_offer: leg=caller callid=[1739281757.246996:eNeVtcj3EHVD68kzXMmatQ..] ftag=[9e935829] ttag=[] type=[] in-iface=[] out-iface=[] ctx-flags=[] flags=[RTP/AVP ICE=remove in-iface=internal out-iface=external media-address=18.100.100.121] peer-flags=[]

Feb 11 13:49:20 [53] DBG:rtp_relay:rtp_relay_answer: leg=callee callid=[1739281757.246996:eNeVtcj3EHVD68kzXMmatQ..] ftag=[9e935829] ttag=[] type=[] in-iface=[] out-iface=[] ctx-flags=[] flags=[RTP/AVP ICE=remove in-iface=internal out-iface=external media-address=18.100.100.121] peer-flags=[]

Attached is a diff of the changes between 3.4.6 and 3.5.3 for reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant