Sip.js: SessionDescriptionHandler failed Cannot read property 'logger' of undefined

Created on 12 Jul 2020  ·  1Comment  ·  Source: onsip/SIP.js

Describe the bug
When I put a session on hold I get this error

sip.SessionDescriptionHandler | SessionDescriptionHandler.getDescription failed - TypeError: Cannot read property 'logger' of undefined
sip.Inviter | Session.getOffer: SDH getDescription rejected...
sip.Inviter | Cannot read property 'logger' of undefined
sip.Inviter | Failed to send re-INVITE
session-description-handler.js?13cd:173 Uncaught (in promise) TypeError: Cannot read property 'logger' of undefined

My code

session.invite({
   sessionDescriptionHandlerModifiers: [session.sessionDescriptionHandler.holdModifier]
)}

Environment Information

  • sip version 0.17.0
  • linux
  • electron 9.1.0
Session Description Handler

Most helpful comment

The SDH API for hold changed in 17.x, but the cleanup of the old method wasn't complete - and this bug.

Anyway, this should work in 17.1 and up...

import { Web } from "sip.js";

// Hold
session.invite({
   sessionDescriptionHandlerModifiers: [Web.holdModifier]
)}

// Unhold
session.invite({
   sessionDescriptionHandlerModifiers: []
)}

>All comments

The SDH API for hold changed in 17.x, but the cleanup of the old method wasn't complete - and this bug.

Anyway, this should work in 17.1 and up...

import { Web } from "sip.js";

// Hold
session.invite({
   sessionDescriptionHandlerModifiers: [Web.holdModifier]
)}

// Unhold
session.invite({
   sessionDescriptionHandlerModifiers: []
)}

Was this page helpful?
0 / 5 - 0 ratings