I have observed the following behavior when direct media is enabled:
An INVITE comes in with SDP that points to caller’s IP and port
Asterisk sends an INVITE to the callee with SDP that points to Asterisk’s IP and port
The callee responds OK to Asterisk with its SDP
Asterisk responds OK to the caller with SDP that points to Asterisk’s IP and port
Asterisk sends a reINVITE to the callee, changing the SDP to point to the caller’s IP and port
Asterisk sends a reINVITE to the caller, changing the SDP to point to the callee’s IP and port
The callee responds OK with same SDP it originally sent
The caller responds OK, but the SDP now points to a different port from its original response
Asterisk does not send a second reINVITE to the callee to correct the port
The caller does not receive audio
Direct media works fine if the caller does not change the port on reINVITE, but breaks if it does.
I have tried setting direct_media_glare_mitigation
to none
and accept_multiple_sdp_answers
to yes
, but neither setting had any affect.
jcolp
March 10, 2025, 9:54am
2
You’ll need to provide a SIP trace and debug log[1].
[1] Collecting Debug Information - Asterisk Documentation
@jcolp See attached logs.
This is with the following set on the receiving endpoint:
direct_media=yes
direct_media_glare_mitigation=none
accept_multiple_sdp_answers=yes
10.3.101.190
is the asterisk server
10.3.101.196
is the calling device
172.30.253.177
is the receiving device
50132
is the original RTP port declared by 10.3.101.196
and 50174
is the updated port that 10.3.101.196
declares in response to the reINVITE, which asterisk does not pass on to 172.30.253.177
.
@jcolp The UI won’t let me attach the file because I’m a new user. Do you want me to post it inline?
jcolp
March 10, 2025, 1:37pm
5
I have raised your trust level, and “accept_multiple_sdp_answers” must also be enabled at the system section as well. Did you do that? If not, then it would do nothing.
asterisk-debug.txt (114.0 KB)
Yes, I have the following in pjsip.conf
[system]
type=system
accept_multiple_sdp_answers=yes
jcolp
March 10, 2025, 1:40pm
7
You’ll need to file an issue[1], there is no guarantee or timeline on when it would get looked into.
[1] GitHub · Where software is built
Of course. Will do. Thank you