@exotel-npm-dev/webrtc-client-sdk 1.0.19 → 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,5 +1,8 @@
1
1
  Change Log
2
2
 
3
+ ## v1.0.20 28 January, 2025
4
+ -[VST-940] Added checks for X-Exotel-Callsid, Call-ID, and LegSid headers in onRecieveInvite.
5
+
3
6
  ## v1.0.19 09 January, 2025
4
7
  -[VST-865] Added option in websdk to select the codec preference
5
8
 
package/dist/exotelsdk.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * WebRTC CLient SIP version 1.0.19
3
+ * WebRTC CLient SIP version 1.0.20
4
4
  *
5
5
  */
6
6
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -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
- _api_callAPI_CallDetails__WEBPACK_IMPORTED_MODULE_9__.CallDetails.callSid = incomingSession.incomingInviteRequest.message.headers['X-Exotel-Callsid'][0].raw;
24075
- _api_callAPI_CallDetails__WEBPACK_IMPORTED_MODULE_9__.CallDetails.callId = incomingSession.incomingInviteRequest.message.headers['Call-ID'][0].raw;
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) {