@exotel-npm-dev/webrtc-client-sdk 1.0.18 → 1.0.20
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/Changelog
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
Change Log
|
|
2
2
|
|
|
3
|
-
## v1.0.
|
|
3
|
+
## v1.0.20 28 January, 2025
|
|
4
|
+
-[VST-940] Added checks for X-Exotel-Callsid, Call-ID, and LegSid headers in onRecieveInvite.
|
|
5
|
+
|
|
6
|
+
## v1.0.19 09 January, 2025
|
|
4
7
|
-[VST-865] Added option in websdk to select the codec preference
|
|
5
8
|
|
|
6
9
|
## v1.0.16 21 November, 2024
|
package/dist/exotelsdk.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* WebRTC CLient SIP version 1.0.
|
|
3
|
+
* WebRTC CLient SIP version 1.0.20
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
6
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -23560,7 +23560,7 @@ var logger = _exotel_npm_dev_webrtc_core_sdk__WEBPACK_IMPORTED_MODULE_0__.webrtc
|
|
|
23560
23560
|
* @param {*} sipAccountInfo
|
|
23561
23561
|
* @param {*} exWebClient
|
|
23562
23562
|
*/
|
|
23563
|
-
function DoRegister(sipAccountInfo, exWebClient) {
|
|
23563
|
+
function DoRegister(sipAccountInfo, exWebClient, delay = 500) {
|
|
23564
23564
|
/**
|
|
23565
23565
|
* When user registers the agent phone for the first time, register your callback onto webrtc client
|
|
23566
23566
|
*/
|
|
@@ -23579,7 +23579,7 @@ function DoRegister(sipAccountInfo, exWebClient) {
|
|
|
23579
23579
|
sipAccountInfo.accountSid,
|
|
23580
23580
|
//accountSid
|
|
23581
23581
|
'', sipAccountInfo); // subscriberToken
|
|
23582
|
-
},
|
|
23582
|
+
}, delay);
|
|
23583
23583
|
} catch (e) {
|
|
23584
23584
|
logger.log("Register failed ", e);
|
|
23585
23585
|
}
|
|
@@ -24070,11 +24070,18 @@ function ExDelegationHandler(exClient_) {
|
|
|
24070
24070
|
};
|
|
24071
24071
|
this.onRecieveInvite = function (incomingSession) {
|
|
24072
24072
|
logger.log("delegationHandler: onRecieveInvite\n");
|
|
24073
|
+
const obj = incomingSession.incomingInviteRequest.message.headers;
|
|
24073
24074
|
exClient.callFromNumber = incomingSession.incomingInviteRequest.message.from.displayName;
|
|
24074
|
-
|
|
24075
|
-
|
|
24075
|
+
if (obj.hasOwnProperty("X-Exotel-Callsid")) {
|
|
24076
|
+
_api_callAPI_CallDetails__WEBPACK_IMPORTED_MODULE_9__.CallDetails.callSid = obj['X-Exotel-Callsid'][0].raw;
|
|
24077
|
+
}
|
|
24078
|
+
if (obj.hasOwnProperty("Call-ID")) {
|
|
24079
|
+
_api_callAPI_CallDetails__WEBPACK_IMPORTED_MODULE_9__.CallDetails.callId = obj['Call-ID'][0].raw;
|
|
24080
|
+
}
|
|
24081
|
+
if (obj.hasOwnProperty("LegSid")) {
|
|
24082
|
+
_api_callAPI_CallDetails__WEBPACK_IMPORTED_MODULE_9__.CallDetails.legSid = obj['LegSid'][0].raw;
|
|
24083
|
+
}
|
|
24076
24084
|
const result = {};
|
|
24077
|
-
const obj = incomingSession.incomingInviteRequest.message.headers;
|
|
24078
24085
|
for (let key in obj) {
|
|
24079
24086
|
if (obj.hasOwnProperty(key)) {
|
|
24080
24087
|
if (obj[key].length == 1) {
|
|
@@ -24248,7 +24255,7 @@ class ExotelWebClient {
|
|
|
24248
24255
|
}
|
|
24249
24256
|
if (this.shouldAutoRetry) {
|
|
24250
24257
|
logger.log("ExWebClient:registerEventCallback Autoretrying");
|
|
24251
|
-
(0,_api_registerAPI_RegisterListener__WEBPACK_IMPORTED_MODULE_1__.DoRegister)(this.sipAccountInfo, this);
|
|
24258
|
+
(0,_api_registerAPI_RegisterListener__WEBPACK_IMPORTED_MODULE_1__.DoRegister)(this.sipAccountInfo, this, 5000);
|
|
24252
24259
|
}
|
|
24253
24260
|
} else if (event === "sent_request") {
|
|
24254
24261
|
/**
|