Skip to content

Attempting to mute a unanswered call makes it unmuteable after answer #685

@KraftyKraft

Description

@KraftyKraft

We're running JsSIP v3.6.1.

When session.mute() is called on an unanswered incoming call, the following error is thrown.

TypeError: Cannot read property 'getSenders' of null
    at RTCSession._toggleMuteAudio (RTCSession.js:3029)
    at RTCSession.mute (RTCSession.js:984)

I suppose that since the call is not answered yet, its RTCPeerConnection is null. However, the variable RTCSession#_audioMuted is set to true regardless.

After answering the call, we can attempt to mute it again by calling session.mute(). Since _audioMuted is still true, nothing happens, and no tracks are disabled. The call is unmuteable at this point.

There are pretty easy, somewhat hacky, ways to get around this - calling RTCSession.unmute first, checking for a connection, etc - but it seems somewhat buggy, so we thought an issue is appropriate :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions