@exotel-npm-dev/webrtc-client-sdk 1.0.18 → 1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exotel-npm-dev/webrtc-client-sdk",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "client sdk for webrtc based on webrtc core sdk",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -7,7 +7,7 @@ var logger = webrtcSIPPhone.getLogger();
7
7
  * @param {*} sipAccountInfo
8
8
  * @param {*} exWebClient
9
9
  */
10
- export function DoRegister(sipAccountInfo, exWebClient) {
10
+ export function DoRegister(sipAccountInfo, exWebClient, delay = 500) {
11
11
  /**
12
12
  * When user registers the agent phone for the first time, register your callback onto webrtc client
13
13
  */
@@ -16,15 +16,14 @@ export function DoRegister(sipAccountInfo, exWebClient) {
16
16
  * CHANGE IS REQUIRED - in the initialize function provision is to be given to pass Callback functions as arguments
17
17
  */
18
18
  try {
19
- setTimeout(function() {
19
+ setTimeout(function () {
20
20
  exWebClient.initialize(userContext,
21
21
  sipAccountInfo.domain, //hostname
22
22
  sipAccountInfo.userName, //subscriberName
23
23
  sipAccountInfo.displayname,//displayName
24
24
  sipAccountInfo.accountSid,//accountSid
25
25
  '', sipAccountInfo); // subscriberToken
26
- }, 500);
27
-
26
+ }, delay);
28
27
  } catch (e) {
29
28
  logger.log("Register failed ", e)
30
29
  }
@@ -360,7 +360,7 @@ export class ExotelWebClient {
360
360
  }
361
361
  if (this.shouldAutoRetry) {
362
362
  logger.log("ExWebClient:registerEventCallback Autoretrying");
363
- DoRegisterRL(this.sipAccountInfo, this);
363
+ DoRegisterRL(this.sipAccountInfo, this, 5000);
364
364
  }
365
365
  } else if (event === "sent_request") {
366
366
  /**