@subiz/wsclient 4.0.18 → 4.0.19

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/webphone.js +6 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@subiz/wsclient",
3
- "version": "4.0.18",
3
+ "version": "4.0.19",
4
4
  "main": "realtime.js",
5
5
  "scripts": {
6
6
  "test": "node realtime.test.js"
package/webphone.js CHANGED
@@ -129,7 +129,7 @@ function WebPhone(access_token, realtime) {
129
129
  }
130
130
 
131
131
  var base = '0123456789abcdef'
132
- this.makeCall = function (number, fromnumber) {
132
+ this.makeCall = function (number, fromnumber, streamPm) {
133
133
  // '11edc52b-2918-4d71-9058-f7285e29d894'
134
134
  var callid =
135
135
  randomString(8, base) +
@@ -142,12 +142,14 @@ function WebPhone(access_token, realtime) {
142
142
  '-' +
143
143
  randomString(12, base)
144
144
 
145
- current_call_id = callid
146
- return webrtcconn.makeCall(number, fromnumber, getMicroPermissions(), callid)
145
+ current_call_id = callid
146
+
147
+ if (!streamPm) streamPm = getMicroPermissions()
148
+ return webrtcconn.makeCall(number, fromnumber, streamPm, callid)
147
149
  }
148
150
 
149
151
  var current_call_id = ''
150
- this.getCurrentCallId = function () {
152
+ this.getCurrentCallId = function () {
151
153
  return current_call_id
152
154
  }
153
155