opensips-js 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23646,8 +23646,8 @@ class oE {
23646
23646
  };
23647
23647
  }
23648
23648
  sendDTMF(t, n) {
23649
- if (!/^[A-D0-9]+$/g.test(n))
23650
- throw new Error("Not allowed character in DTMF input");
23649
+ if (!/^[A-D0-9*#]+$/g.test(n))
23650
+ throw new Error("Not allowed character used in the DTMF input");
23651
23651
  this.extendedCalls[t].sendDTMF(n);
23652
23652
  }
23653
23653
  setIsMuted(t) {
@@ -23852,19 +23852,19 @@ class oE {
23852
23852
  n.push(o.track);
23853
23853
  });
23854
23854
  }), await dv.forEach(t, async (a) => {
23855
- var r;
23855
+ var s;
23856
23856
  if (a == null)
23857
23857
  return;
23858
- const o = new MediaStream(), s = An.createMediaStreamDestination();
23859
- if (a.connection.getReceivers().forEach((d) => {
23860
- n.forEach((h) => {
23861
- o.addTrack(d.track), d.track.id !== h.id && An.createMediaStreamSource(new MediaStream([h])).connect(s);
23858
+ const o = An.createMediaStreamDestination();
23859
+ if (a.connection.getReceivers().forEach((r) => {
23860
+ n.forEach((d) => {
23861
+ r.track.id !== d.id && d.readyState === "live" && An.createMediaStreamSource(new MediaStream([d])).connect(o);
23862
23862
  });
23863
- }), t[0].roomId === this.currentActiveRoomId) {
23864
- const d = this.getActiveStream();
23865
- An.createMediaStreamSource(d).connect(s);
23863
+ }), a.roomId === this.currentActiveRoomId) {
23864
+ const r = this.getActiveStream();
23865
+ r && r.getTracks().length > 0 && An.createMediaStreamSource(r).connect(o);
23866
23866
  }
23867
- (r = a.connection) != null && r.getSenders()[0] && (await a.connection.getSenders()[0].replaceTrack(s.stream.getTracks()[0]), this.muteReconfigure(a));
23867
+ (s = a.connection) != null && s.getSenders()[0] && o.stream.getTracks()[0] && (await a.connection.getSenders()[0].replaceTrack(o.stream.getTracks()[0]), this.muteReconfigure(a));
23868
23868
  });
23869
23869
  }
23870
23870
  processCallerMute(t, n) {