Closed Karakoukie closed 7 months ago
What is the "caller" here? To hard to figure out. I assume JsSTIP is not the "caller" in your scenario, but those things must be properly explained when reporting a bug.
So the fact that Firefox adds a a=sendrecv
attribute at global SDP level is irrelevant. In the m=audio
section there is a proper a=sendonly
attribute that overrides the global one. If Asterisk doesn't understand it that's a bug in Asterisk side.
Hi
reproduced here also. Asterisk 18.14
The issue exists in any call direction: either if it's incoming (session invte created by pbx) or outgoing (session invite created by jssip)
the SDP rfc say:
a=sendonly This specifies that the tools should be started in send-only mode. An example may be where a different unicast address is to be used for a traffic destination than for a traffic source. In such a case, two media descriptions may be used, one sendonly and one recvonly. It can be either a session- or media-level attribute, but would normally only be used as a media attribute. It is not dependent on charset. Note that sendonly applies only to the media, and any associated control protocol (e.g., RTCP) SHOULD still be received and processed as normal.
if i get it right, while its not invalid to put this in sesion level, it's preferable to put it in media level only. we'll check what can be done in asterisk side but i thinks it's really better to be clean and put this attribute only in media level instead of both session and media.
but i thinks it's really better to be clean and put this attribute only in media level instead of both session and media.
This is not JsSIP decision. It's Firefox the one that generates its SDP with that attribute at session and media level. This is WebRTC. Browsers generate their SDPs, not us.
but i thinks it's really better to be clean and put this attribute only in media level instead of both session and media.
This is not JsSIP decision. It's Firefox the one that generates its SDP with that attribute at session and media level. This is WebRTC. Browsers generate their SDPs, not us.
interesting, i thought it was set by jssip.
JsSIP doesn't create SDP. It rewrites it a bit to change the sendrecv attribute at media level when calling hold() and unhold(), nothing else.
Noted. i'll check if this bug (but is it ?) is reported on mozilla bugreport, and i'll check if we can do something on asterisk level. i agree that asterisk should play MOH in any case.
Firefox could omit the session level attribute but that's not a bug. Asterisk is the problem since if should check the media level attribute if present and override the session level one.
Hi Using Firefox 122.0
When putting caller on hold using the hold method of rtcsession (using reinvite), the SDP sent by JsSIP is incorrect: there is a "a=sendrecv" out of the media attributes in the first few lines of the SDP. The caller is on hold but asterisk does not send any music on hold.
Using Chrome, this attribute is not present, and asterisk correctly send moh to the caller.
Incorrect SDP sent by Firefox:
Correct SDP sent by Chrome