Sip.js: DOMException: فشل تنفيذ "setRemoteDescription" على "RTCPeerConnection": فشل تحليل SessionDescription. [كائن كائن] توقع سطر: v =

تم إنشاؤها على ١٢ أكتوبر ٢٠١٨  ·  8تعليقات  ·  مصدر: onsip/SIP.js

صف الخلل
لا يعمل libs بشكل صحيح.

DOMException: فشل تنفيذ "setRemoteDescription" على "RTCPeerConnection": فشل تحليل SessionDescription. [كائن كائن] توقع سطر: v =
على http: //localhost/sip-0.11.4٪20 (1) .js: 9733: 38

لدي مشكلة في نفس قسم الكود:

`/ **
* اضبط الوصف البعيد لتطبيق الوسائط الأساسي
*param {} سلسلة sessionDescription وصف المقدمة من رسالة SIP إلى أن يتم تعيين على تنفيذ وسائل الإعلام
* param {Object} [options] كائن الخيارات الذي تستخدمه getDescription
* param {MediaStreamConstraints} [options.constraints] MediaStreamConstraints https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamConstraints
* param {Object} [options.peerConnectionOptions] إذا تم تعيين هذا ، فسيتم إعادة إنشاء اتصال النظير بالخيارات الجديدة
* param {Array} [معدّلات] صفيف مع استخدام معدّلات الوصف لمرة واحدة
* returns {Promise}
* /
setDescription: {writable: true، value: function setDescription (sessionDescription، options، modifiers) {
var _this = هذا ؛

    var self = this;

    options = options || {};
    if (options.peerConnectionOptions) {
      this.initPeerConnection(options.peerConnectionOptions);
    }

    modifiers = modifiers || [];
    if (!Array.isArray(modifiers)) {
      modifiers = [modifiers];
    }
    modifiers = modifiers.concat(this.modifiers);

    var description = {
      type: this.hasOffer('local') ? 'answer' : 'offer',
      sdp: sessionDescription
    };

    return SIP.Utils.Promise.resolve().then(function () {
      // Media should be acquired in getDescription unless we need to do it sooner for some reason (FF61+)
      if (this.shouldAcquireMedia && this.options.alwaysAcquireMediaFirst) {
        return this.acquire(this.constraints).then(function () {
          this.shouldAcquireMedia = false;
        }.bind(this));
      }
    }.bind(this)).then(function () {
      return SIP.Utils.reducePromises(modifiers, description);
    }).catch(function (e) {
      if (e instanceof SIP.Exceptions.SessionDescriptionHandlerError) {
        throw e;
      }
      var error = new SIP.Exceptions.SessionDescriptionHandlerError("setDescription", e, "The modifiers did not resolve successfully");
      _this.logger.error(error.message);
      self.emit('peerConnection-setRemoteDescriptionFailed', error);
      throw error;
    }).then(function (modifiedDescription) {
      self.emit('setDescription', modifiedDescription);
      return self.peerConnection.setRemoteDescription(modifiedDescription);
    }).catch(function (e) {
      if (e instanceof SIP.Exceptions.SessionDescriptionHandlerError) {
        throw e;
      }
      // Check the original SDP for video, and ensure that we have want to do audio fallback
      if (/^m=video.+$/gm.test(sessionDescription) && !options.disableAudioFallback) {
        // Do not try to audio fallback again
        options.disableAudioFallback = true;
        // Remove video first, then do the other modifiers
        return _this.setDescription(sessionDescription, options, [SIP.Web.Modifiers.stripVideo].concat(modifiers));
      }
      var error = new SIP.Exceptions.SessionDescriptionHandlerError("setDescription", e);
      _this.logger.error(error.error);
      _this.emit('peerConnection-setRemoteDescriptionFailed', error);
      throw error;
    }).then(function setRemoteDescriptionSuccess() {
      if (self.peerConnection.getReceivers) {
        self.emit('setRemoteDescription', self.peerConnection.getReceivers());
      } else {
        self.emit('setRemoteDescription', self.peerConnection.getRemoteStreams());
      }
      self.emit('confirmed', self);
    });
  } },`

ال 8 كومينتر

أظهر لي فحص كود js أن "modifiedDescription.sdp" هو كائن عودي لـ sdp

الرجاء نشر سجلات كاملة في جوهرها. هل تحاول تعديل SDP بنفسك ، أم أن هذا مجرد محاولة للتحديث من إصدار سابق إلى الإصدار الحالي؟

سجلات من علامة النجمة أو وحدة تحكم المتصفح؟ وتحتاج إلى traceSip: صحيح ، في وحدة تحكم المتصفح؟
بدأت باستخدام sip.js من إصدار 0.11.4. أنا لا أعدل sdp.

وحدة تحكم المتصفح

[جوهر] (https://gist.github.com/kakabara/d39058805af90637a62931893900fb55) ولكن في Firefox تلقيت خطأ "فشل تحليل SDP: خطأ تحليل SDP في السطر 1: نهاية السطر بعد نهاية المخزن المؤقت." شاهده على 326 سطراً.
في Google Chrome ، احصل على الاستثناءات الخاصة بي مع مجموعة التحليل الفاشلة RemoteDescription

لا تقوم النجمة بإرسال مرشحي ICE. المشكلة في جوهرها ليست هي نفس المشكلة التي ذكرتها أعلاه.

آسف ، لمشكلتي غير الصحيحة ، إنها الأولى. أنا أفهم بشكل صحيح ما أرسله المتصل لمرشح الجليد ، لكن لا ترسل علامة النجمة إلى عميل آخر هذا؟

آسف. لا أفهم. يتطلب WebRTC استخدام ICE و DTLS. هذا يبدو وكأنه مشكلة النجمة لذا سأغلق هذا. يرجى متابعة مشروع النجمة بخصوص مشاكلك هناك.

هل كانت هذه الصفحة مفيدة؟
0 / 5 - 0 التقييمات