InvalidSessionDescriptionError: "Invalid description, no fingerprint attribute" (Firefox 55.0.3)

719 views
Skip to first unread message

HeryVK

unread,
Aug 31, 2017, 4:07:13 AM8/31/17
to SIP.js
Hello,

I'm quite new to SIPjs.

I'm trying the SIPjs 0.7.8 to establish an audio-only call between SIPjs and a third party extension.
The session config is set to receive remote video if the remote endpoint decide to enable his camera.

The scenario is :

Caller (cal...@subdomain.onsip.com) call the remote endpoint (00...@subdomain.3cx.fr) which is in busy state.

The remote Proxy forward internally the call to other extension that are available.

Another callee (00...@subdomain.3cx.fr) pick the call, as from a forward rule.

Under the hood, I notice the remote endpoint send INVITE and SIPjs receive successfully the INVITE.

During the call session, now between cal...@subdomain.onsip.com and 00...@subdomain.3cx.fr, the remote endpoint enable his video, so  the remote endpoint send another INVITE

Upong receiving, the call is dropped  with an error (Firefox only) :

DOMException [InvalidSessionDescriptionError: "Invalid description, no fingerprint attribute"
code: 0
nsresult: 0x0]



Here is the session config :

  config_session = {

    media: {
      constraints: {
        audio: true,                                       
        video: false,                                       
      },
      render: {
        remote: document.getElementById("video_remote"), 
        local: document.getElementById("video_local"),   
      }
    },

    RTCConstraints: {
      optional: [],
      mandatory: {
        'OfferToReceiveAudio': true,
        'OfferToReceiveVideo': true
      }
    }

  }

Here is the ua config :

  var config_ua = {

    
    uri: 'sip:cal...@subdomain.onsip.com',                           
    authorizationUser: 'callerid',  
    password: 'passwd',                
    displayName: 'Caller',          

    stunServers: [...],                                     
    turnServers: [...],                                     

    traceSip: true,                                      
    hackWssInTransport: true,

    // HackIpInContact for Asterisk-type server
    hackIpInContact: true,

    // rtcpMuxPolicy for Asterisk-type server
    rtcpMuxPolicy: 'negotiate',
  };

...

ua = new SIP.UA(config_ua); session = ua.invite("sip:00...@subdomain.3cx.fr:5060", config_session);


This settings work well on Chrome but I get an InvalidSessionDescriptionError on Firefox.

The full log is attached to this message.

Thanks for any help.
       

log_sipjs_firefox.txt

HeryVK

unread,
Aug 31, 2017, 10:05:52 AM8/31/17
to SIP.js

Here is the gist link for more clarity.

https://gist.github.com/anonymous/b86aae576f7e39107817756efea182d0

Thanks.


Eric Green

unread,
Aug 31, 2017, 10:19:08 AM8/31/17
to SIP.js
Can you include working logs from Chrome? I cannot imagine that this works in Chrome. It looks like a problem with whatever is calling SIP.js. It is missing the DTLS aspect of the SDP. WebRTC requires DTLS.

Also can you clarify what version of SIP.js you are using?

Thanks,
-Eric Green

HeryVK

unread,
Aug 31, 2017, 11:20:28 AM8/31/17
to SIP.js
Here is a new gist containing both logs (fFirefox and Chrome)

https://gist.github.com/anonymous/386650e1d8c9d94d3f452867888727ca

I'm using

SIPjs 0.7.8 (master branch)
Firefox 55.0.3 (call dropped when remote endpo)
Chrome 60.0.3112.113

Thanks



HeryVK

unread,
Aug 31, 2017, 11:44:01 AM8/31/17
to SIP.js
I notice that when local endpoint received the remote Re-INVITE, video m-sections is set as following :

a=inactive on Firefox

[log_sipjs_firefox.txt]

l.461..464

m=video 0 UDP/TLS/RTP/SAVPF 120
c=IN IP4 0.0.0.0
a=inactive
a=rtpmap:120 VP8/90000

a=recvonly (as expected on Chrome because I've set the session OfferToReceiveVideo: true)

[log_sipjs_chrome.txt]

l.604..608

m=video 0 UDP/TLS/RTP/SAVPF 0
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=mid:video
a=recvonly

Does Sipjs hack remote SDP depending on browser ?


Eric Green

unread,
Aug 31, 2017, 11:51:22 AM8/31/17
to SIP.js
The issue with Firefox is that the initial invite transaction never sets up correctly. There is a 200 OK with SDP then SIP.js tries to send an ACK with SDP even though it should just send an ACK without SDP. The ACK is never processed by the other endpoint, because the 200 OK keeps getting retransmitted.

The weird part here is that Chrome is behaving correctly. There are some SDP hacks in the version of SIP.js that you are using which are browser specific, but I cannot remember what they are.

I also notice that you are using OnSIP. Can you try disabling the the 2 hacks and the rtcpMuxPolicy in your config. I do not think it will make a difference, but it is not required to use OnSIP. 

I have tried to reproduce the problem myself, but I am unable to. This is leading me to believe that the underlying issue is with the 3cx endpoint that you are using on the other end. Try calling wel...@onsip.com from firefox and see if that works.

-Eric Green

HeryVK

unread,
Aug 31, 2017, 11:57:18 AM8/31/17
to SIP.js
Thanks Eric !

I'll try what you mentionned and let you know if it works.

Regards

HeryVK

HeryVK

unread,
Aug 31, 2017, 2:13:44 PM8/31/17
to SIP.js
I was able to send a correct INVITE in both Firefox and Chrome without any Hacks by settings session config like this :

    RTCConstraints: {
      optional: [],
      // Chrome

      mandatory: {
        'OfferToReceiveAudio': true,
        'OfferToReceiveVideo': true
      },
      // Firefox
      'offerToReceiveAudio': true,
      'offerToReceiveVideo': true
    }

There is a case difference between the Chrome and Firefox keywords !

Credit goes to : https://stackoverflow.com/questions/35817908/firefox-doesnt-create-an-offer-cannot-create-an-offer-with-no-local-tracks-no

As result, Firefox set up video m-sections as a=recvonly as expected

The problem is now in the remote endpoint answer because there is no direction attribute in remote SDP answer.

--

From RFC 4566 Section 6, page 26
"
If none of the attributes "sendonly", "recvonly", "inactive",
and "sendrecv" is present, "sendrecv" SHOULD be assumed as the
default for sessions that are not of the conference type
"broadcast" or "H332" (see below)."

--

Now, I was wondering it there is a workaround on SIPjs, to modify remote SDP with sendonly attribute before sending SDP to browser ?









HeryVK

unread,
Aug 31, 2017, 2:15:17 PM8/31/17
to SIP.js
On remote SDP answer, Firefox throws :

DOMException [InvalidSessionDescriptionError: "Answer tried to set recv when offer did not set send"

Eric Green

unread,
Aug 31, 2017, 2:16:28 PM8/31/17
to SIP.js
Good catch.

Easiest way to modify SDP is to use the sesion-description-rewrite branch and create a modifier. They are there specifically for this purpose. On the old media handler code, you will have to hack away at the media handler.

-Eric Green

HeryVK

unread,
Aug 31, 2017, 3:17:32 PM8/31/17
to SIP.js

Currently, I want to stay on the current version (0.7.8). But will migrate to the new coming one as soon as documentation is ready :)

Otherwise, any guidelines for the custom mediaHandlerFactory ?

The objective is to modify remote SDP direction attribute into a=sendonly, OR alternatively, modify local SDP to a=sendrcv ( and hope it will works :) )

Thanks.
Reply all
Reply to author
Forward
0 new messages