@webex/plugin-meetings 1.159.1 → 1.159.2

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.
@@ -870,20 +870,19 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
870
870
  roapSeq: 0,
871
871
  locus: type === _constants._LOCUS_ID_ ? destination : null,
872
872
  // pass the locus object if present
873
- meetingInfoProvider: this.meetingInfo
873
+ meetingInfoProvider: this.meetingInfo,
874
+ destination: destination,
875
+ destinationType: type
874
876
  }, {
875
877
  parent: this.webex
876
878
  });
877
879
  this.meetingCollection.set(meeting);
878
880
  _context.prev = 3;
879
881
  _context.next = 6;
880
- return meeting.fetchMeetingInfo({
881
- destination: destination,
882
- type: type
883
- });
882
+ return meeting.fetchMeetingInfo({});
884
883
 
885
884
  case 6:
886
- _context.next = 13;
885
+ _context.next = 12;
887
886
  break;
888
887
 
889
888
  case 8:
@@ -897,13 +896,10 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
897
896
  _loggerProxy.default.logger.info('Meetings:index#createMeeting --> Info assuming this destination is a 1:1 or wireless share');
898
897
  }
899
898
 
900
- _loggerProxy.default.logger.debug("Meetings:index#createMeeting --> Debug ".concat(_context.t0, " fetching /meetingInfo for creation.")); // We need to save this info for future reference
901
-
899
+ _loggerProxy.default.logger.debug("Meetings:index#createMeeting --> Debug ".concat(_context.t0, " fetching /meetingInfo for creation."));
902
900
 
903
- meeting.destination = destination;
904
-
905
- case 13:
906
- _context.prev = 13;
901
+ case 12:
902
+ _context.prev = 12;
907
903
 
908
904
  // For type LOCUS_ID we need to parse the locus object to get the information
909
905
  // about the caller and callee
@@ -926,17 +922,17 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
926
922
  });
927
923
  }
928
924
 
929
- return _context.finish(13);
925
+ return _context.finish(12);
930
926
 
931
- case 16:
927
+ case 15:
932
928
  return _context.abrupt("return", meeting);
933
929
 
934
- case 17:
930
+ case 16:
935
931
  case "end":
936
932
  return _context.stop();
937
933
  }
938
934
  }
939
- }, _callee, this, [[3, 8, 13, 16]]);
935
+ }, _callee, this, [[3, 8, 12, 15]]);
940
936
  }));
941
937
 
942
938
  function createMeeting(_x) {
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"names":["Meetings","args","MEETINGS","request","Request","parent","webex","loggerRequest","LoggerRequest","meetingCollection","MeetingCollection","personalMeetingRoom","reachability","registered","preferredWebexSite","media","getUserMedia","Media","getSupportedDevice","onReady","MeetingsUtil","checkH264Support","disableNotifications","Metrics","initialSetup","data","meeting","getByKey","LOCUS_URL","locusUrl","CORRELATION_ID","checkForCorrelationId","internal","device","url","locus","SIP_URI","self","callbackInfo","callbackAddress","CONVERSATION_URL","conversationUrl","replaces","length","fullState","state","LOCUS","STATE","INACTIVE","LoggerProxy","logger","warn","_LEFT_","removed","create","_LOCUS_ID_","then","newMeeting","locusInfo","catch","e","console","log","finally","getMeetingByType","_ID_","id","postEvent","event","eventType","REMOTE_STARTED","trigger","MERCURY_EVENT","Trigger","file","function","EVENT_TRIGGERS","MEETING_ADDED","type","_MEETING_","_JOIN_","_INCOMING_","parse","envelope","LOCUSEVENT","MESSAGE_ROAP","handleLocusEvent","MEETINGS_NETWORK_DISCONNECTED","mercury","on","LOCUS_MERCURY","handleLocusMercury","ROAP","ROAP_MERCURY","handleRoapMercury","ONLINE","syncMeetings","OFFLINE","handleMercuryOffline","off","once","READY","StaticConfig","set","config","LoggerConfig","logging","meetingInfo","experimental","enableUnifiedMeetings","MeetingInfoV2","MeetingInfo","PersonalMeetingRoom","MEETINGS_READY","changeState","enableAdhocMeetings","canAuthorize","error","reject","Error","info","resolve","all","fetchUserPreferredWebexSite","getGeoHint","startReachability","message","register","connect","call","listenForEvents","MEETINGS_REGISTERED","sendBehavioralMetric","BEHAVIORAL_METRICS","MEETINGS_REGISTRATION_SUCCESS","MEETINGS_REGISTRATION_FAILED","reason","stack","stopListeningForEvents","disconnect","unregister","MEETINGS_UNREGISTERED","options","uploadLogs","uploadResult","MEETING_LOG_UPLOAD_SUCCESS","meetingId","details","uploadError","MEETING_LOG_UPLOAD_FAILURE","UPLOAD_LOGS_FAILURE","meetingsId","code","Reachability","setReachability","getReachability","gatherReachability","fetchGeoHint","res","geoHintInfo","fetchLoginUserInformation","userPreferences","parseUserPreferences","MeetingUtil","cleanUp","delete","MEETING_REMOVED","destination","fetchInfoOptions","targetDest","_CONVERSATION_URL_","createMeeting","createdMeeting","EVENTS","DESTROY_MEETING","payload","autoUploadLogs","callStart","lastActive","correlationId","feedbackId","locusId","webExMeetingId","destroy","REQUEST_UPLOAD_LOGS","meetingInstance","Meeting","userId","deviceUrl","orgId","roapSeq","meetingInfoProvider","fetchMeetingInfo","CaptchaError","PasswordError","debug","sipUri","setSipUri","meetingAddedType","getMeetingAddedType","value","getAll","getActiveMeetings","locusArray","activeLocusUrl","loci","forEach","push","meetingsCollection","includes","MEETING_REMOVED_REASON","NO_MEETINGS_TO_SYNC","scheduled","get","StatsAnalyzer","StatsCalculator","WebexPlugin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;AACA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAuBA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;IACqBA,Q;;;;;AAGjB;AACJ;AACA;AACA;AACA;AACA;AACI,sBAAqB;AAAA;;AAAA;;AAAA,sCAANC,IAAM;AAANA,MAAAA,IAAM;AAAA;;AAC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AAC3K,KAAD,EAAW;AACjCyK,YAAAA,cAAc,CAACG,IAAf,CAAoB5K,KAAK,CAACD,GAA1B;;AACA,YAAA,OAAI,CAACoD,gBAAL,CAAsB;AACpBnD,cAAAA,KAAK,EAALA,KADoB;AAEpBN,cAAAA,QAAQ,EAAEM,KAAK,CAACD;AAFI,aAAtB;AAID,WAND;AAOD;;AACD,YAAM8K,kBAAkB,GAAG,OAAI,CAACvM,iBAAL,CAAuBgM,MAAvB,EAA3B;;AAEA,YAAI,mBAAYO,kBAAZ,EAAgCrK,MAAhC,GAAyC,CAA7C,EAAgD;AAC9C;AACA;AACA,4CAAsB,qBAAcqK,kBAAd,CAAtB,oCAAyD;AAApD,gBAAMtL,OAAO,qBAAb;;AACH,gBAAI,CAACkL,cAAc,CAACK,QAAf,CAAwBvL,OAAO,CAACG,QAAhC,CAAL,EAAgD;AAC9C;AACA,cAAA,OAAI,CAAC0J,OAAL,CAAa7J,OAAb,EAAsBwL,kCAAuBC,mBAA7C;AACD;AACF;AACF;AACF,OAxBM,CAAP;AAyBD;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;;;WACI,gCAAuB;AACrB,aAAO,KAAK1M,iBAAL,CAAuBgM,MAAvB,CAA8B;AAACW,QAAAA,SAAS,EAAE;AAAZ,OAA9B,CAAP;AACD;AAED;AACJ;AACA;AACA;;;;WACI,qBAAY;AACV,aAAOnK,qBAAYoK,GAAZ,EAAP;AACD;AAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,uBAAc;AACZ,aAAOC,iBAAP;AACD;AAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,yBAAgB;AACd,aAAOC,mBAAP;AACD;;;EA/0BiCC,sB","sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n*/\n\nimport '@webex/internal-plugin-mercury';\nimport '@webex/internal-plugin-conversation';\nimport {WebexPlugin} from '@webex/webex-core';\n\nimport 'webrtc-adapter';\n\nimport Metrics from '../metrics';\nimport {trigger, eventType} from '../metrics/config';\nimport LoggerConfig from '../common/logs/logger-config';\nimport StaticConfig from '../common/config';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport LoggerRequest from '../common/logs/request';\nimport Trigger from '../common/events/trigger-proxy';\nimport Media from '../media';\nimport MeetingUtil from '../meeting/util';\nimport {\n MEETINGS,\n EVENTS,\n EVENT_TRIGGERS,\n READY,\n LOCUSEVENT,\n LOCUS_URL,\n ROAP,\n ONLINE,\n OFFLINE,\n _MEETING_,\n _JOIN_,\n _LOCUS_ID_,\n _INCOMING_,\n LOCUS,\n CORRELATION_ID,\n SIP_URI,\n _LEFT_,\n _ID_,\n MEETING_REMOVED_REASON,\n _CONVERSATION_URL_,\n CONVERSATION_URL\n} from '../constants';\nimport BEHAVIORAL_METRICS from '../metrics/constants';\nimport MeetingInfo from '../meeting-info';\nimport MeetingInfoV2 from '../meeting-info/meeting-info-v2';\nimport Meeting from '../meeting';\nimport PersonalMeetingRoom from '../personal-meeting-room';\nimport Reachability from '../reachability';\nimport Request from '../meetings/request';\nimport StatsAnalyzer from '../analyzer/analyzer';\nimport StatsCalculator from '../analyzer/calculator';\nimport PasswordError from '../common/errors/password-error';\nimport CaptchaError from '../common/errors/captcha-error';\n\nimport MeetingCollection from './collection';\nimport MeetingsUtil from './util';\n\n\n/**\n * Meetings Ready Event\n * Emitted when the meetings instance on webex is ready\n * @event meetings:ready\n * @instance\n * @memberof Meetings\n */\n\n/**\n * Meetings Network Disconnected Event\n * Emitted when the meetings instance is disconnected from\n * the internal mercury server\n * @event network:disconnected\n * @instance\n * @memberof Meetings\n */\n\n/**\n * Meetings Registered Event\n * Emitted when the meetings instance has been registered and listening\n * @event meetings:registered\n * @instance\n * @memberof Meetings\n */\n\n/**\n * Meeting Removed Event\n * Emitted when a meeting was removed from the cache of meetings\n * @event meeting:removed\n * @instance\n * @type {Object}\n * @property {String} meetingId the removed meeting\n * @property {Object} response the server response\n * @property {String} type what type of meeting it was\n * @memberof Meetings\n */\n\n/**\n * Meeting Added Event\n * Emitted when a meeting was added to the cache of meetings\n * @event meeting:added\n * @instance\n * @type {Object}\n * @property {String} meetingId the added meeting\n * @property {String} type what type of meeting it was\n * @memberof Meetings\n */\n\n/**\n * Maintain a cache of meetings and sync with services.\n * @class\n */\nexport default class Meetings extends WebexPlugin {\n namespace = MEETINGS;\n\n /**\n * Initializes the Meetings Plugin\n * @constructor\n * @public\n * @memberof Meetings\n */\n constructor(...args) {\n super(...args);\n\n /**\n * The Meetings request to interact with server\n * @instance\n * @type {Object}\n * @private\n * @memberof Meetings\n */\n this.request = new Request({}, {parent: this.webex});\n /**\n * Log upload request helper\n * @instance\n * @type {Object}\n * @private\n * @memberof Meetings\n */\n this.loggerRequest = new LoggerRequest({webex: this.webex});\n this.meetingCollection = new MeetingCollection();\n /**\n * The PersonalMeetingRoom object to interact with server\n * @instance\n * @type {Object}\n * @public\n * @memberof Meetings\n */\n this.personalMeetingRoom = null;\n /**\n * The Reachability object to interact with server, starts as null until {@link Meeting#setReachability} is called\n * starts as null\n * @instance\n * @type {Object}\n * @private\n * @memberof Meetings\n */\n this.reachability = null;\n\n /**\n * If the meetings plugin has been registered and listening via {@link Meetings#register}\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Meetings\n */\n this.registered = false;\n\n /**\n * This values indicates the preferred webex site the user will start there meeting, getsits value from {@link Meetings#register}\n * @instance\n * @type {String}\n * @private\n * @memberof Meetings\n */\n this.preferredWebexSite = '';\n\n /**\n * The public interface for the internal Media util files. These are helpful to expose outside the context\n * of a meeting so that a user can access media without creating a meeting instance.\n * @instance\n * @type {Object}\n * @private\n * @memberof Meetings\n */\n this.media = {\n getUserMedia: Media.getUserMedia,\n getSupportedDevice: Media.getSupportedDevice\n };\n\n this.onReady();\n MeetingsUtil.checkH264Support({disableNotifications: true});\n Metrics.initialSetup(this.meetingCollection, this.webex);\n }\n\n /**\n * handle locus events and takes meeting actions with them as they come in\n * @param {Object} data a locus event\n * @param {String} data.locusUrl\n * @param {Object} data.locus\n * @param {String} data.eventType\n * @returns {undefined}\n * @private\n * @memberof Meetings\n */\n handleLocusEvent(data) {\n let meeting = null;\n\n // getting meeting by correlationId. This will happen for the new event\n // Either the locus\n // TODO : Add check for the callBack Address\n meeting = this.meetingCollection.getByKey(LOCUS_URL, data.locusUrl) ||\n this.meetingCollection.getByKey(CORRELATION_ID, MeetingsUtil.checkForCorrelationId(this.webex.internal.device.url, data.locus)) ||\n this.meetingCollection.getByKey(SIP_URI, data.locus.self && data.locus.self.callbackInfo && data.locus.self.callbackInfo.callbackAddress) ||\n this.meetingCollection.getByKey(CONVERSATION_URL, data.locus.conversationUrl);\n\n // Special case when locus has got replaced, This only happend once if a replace locus exists\n // https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-changing-mid-call\n\n if (!meeting && data.locus?.replaces?.length > 0) {\n // Always the last element in the replace is the active one\n meeting = this.meetingCollection.getByKey(LOCUS_URL, data.locus.replaces[data.locus.replaces.length - 1].locusUrl);\n }\n\n if (!meeting) {\n // TODO: create meeting when we get a meeting object\n // const checkForEnded = (locus) => {\n // TODO: you already ended the meeting but you got an event later\n // Mainly for 1:1 Callsor meeting\n // Happens mainly after refresh\n\n // 1:1 Meeting\n // 1) You ended a call before but you got a mercury event\n // Make sure end the call and cleanup the meeting only if the mercury\n // event says so\n // 2) Maintain lastSync time in the meetings object which helps to compare\n // If the meeting came befor or after the sync . ANy meeting start time before the sync time is invalid\n\n // For space Meeting\n // Check the locus object and see who has joined\n\n // };\n // rather then locus object change to locus url\n\n if (data.locus && data.locus.fullState && data.locus.fullState.state === LOCUS.STATE.INACTIVE) {\n // just ignore the event as its already ended and not active\n LoggerProxy.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');\n\n return;\n }\n\n\n // When its wireless share or guest and user leaves the meeting we dont have to keep the meeting object\n // Any future events will be neglected\n\n if (data.locus && data.locus.self && (data.locus.self.state === _LEFT_ && data.locus.self.removed === true)) {\n // just ignore the event as its already ended and not active\n LoggerProxy.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');\n\n return;\n }\n\n this.create(data.locus, _LOCUS_ID_).then((newMeeting) => {\n meeting = newMeeting;\n\n // It's a new meeting so initialize the locus data\n meeting.locusInfo.initialSetup(data.locus);\n }).catch((e) => {\n console.log(e);\n })\n .finally(() => {\n // There will be cases where locus event comes in gets created and deleted because its a 1:1 and meeting gets deleted\n // because the other user left so before sending 'added' event make sure it exists in the collection\n\n if (this.getMeetingByType(_ID_, meeting.id)) {\n Metrics.postEvent({event: eventType.REMOTE_STARTED, meeting, data: {trigger: trigger.MERCURY_EVENT}});\n Trigger.trigger(\n this,\n {\n file: 'meetings',\n function: 'handleLocusEvent'\n },\n EVENT_TRIGGERS.MEETING_ADDED,\n {\n meeting,\n type: meeting.type === _MEETING_ ? _JOIN_ : _INCOMING_\n }\n );\n }\n else {\n // Meeting got added but was not found in the collection. It might have got destroyed\n LoggerProxy.logger.warn('Meetings:index#handleLocusEvent --> Created and destroyed meeting object before sending an event');\n }\n });\n }\n else {\n meeting.locusInfo.parse(meeting, data);\n }\n }\n\n /**\n * handles locus events through mercury that are not roap\n * @param {Object} envelope\n * @param {Object} envelope.data\n * @param {String} envelope.data.eventType\n * @returns {undefined}\n * @private\n * @memberof Meetings\n */\n handleLocusMercury(envelope) {\n const {data} = envelope;\n const {eventType} = data;\n\n if (eventType && eventType !== LOCUSEVENT.MESSAGE_ROAP) {\n this.handleLocusEvent(data);\n }\n }\n\n\n /**\n * handles mecury offline event\n * @returns {undefined}\n * @private\n * @memberof Meetings\n */\n handleMercuryOffline() {\n Trigger.trigger(\n this,\n {\n file: 'meetings/index',\n function: 'handleMercuryOffline'\n },\n EVENT_TRIGGERS.MEETINGS_NETWORK_DISCONNECTED,\n );\n }\n\n\n /**\n * registers for locus and roap mercury events\n * @returns {undefined}\n * @private\n * @memberof Meetings\n */\n listenForEvents() {\n this.webex.internal.mercury.on(LOCUSEVENT.LOCUS_MERCURY, (envelope) => {\n this.handleLocusMercury(envelope);\n });\n this.webex.internal.mercury.on(ROAP.ROAP_MERCURY, (envelope) => {\n MeetingsUtil.handleRoapMercury(envelope, this.meetingCollection);\n });\n\n this.webex.internal.mercury.on(ONLINE, () => {\n this.syncMeetings();\n });\n\n this.webex.internal.mercury.on(OFFLINE, () => {\n this.handleMercuryOffline();\n });\n }\n\n /**\n * stops listening for locus and roap mercury events\n * @returns {undefined}\n * @private\n * @memberof Meetings\n */\n stopListeningForEvents() {\n this.webex.internal.mercury.off(LOCUSEVENT.LOCUS_MERCURY);\n this.webex.internal.mercury.off(ROAP.ROAP_MERCURY);\n this.webex.internal.mercury.off(ONLINE);\n }\n\n /**\n * @returns {undefined}\n * @private\n * @memberof Meetings\n */\n onReady() {\n this.webex.once(READY, () => {\n StaticConfig.set(this.config);\n LoggerProxy.set(this.webex.logger);\n LoggerConfig.set(this.config.logging);\n\n /**\n * The MeetingInfo object to interact with server\n * @instance\n * @type {Object}\n * @private\n * @memberof Meetings\n */\n this.meetingInfo = this.config.experimental.enableUnifiedMeetings ? new MeetingInfoV2(this.webex) : new MeetingInfo(this.webex);\n this.personalMeetingRoom = new PersonalMeetingRoom({meetingInfo: this.meetingInfo}, {parent: this.webex});\n\n Trigger.trigger(\n this,\n {\n file: 'meetings',\n function: 'onReady'\n },\n EVENT_TRIGGERS.MEETINGS_READY\n );\n });\n }\n\n /**\n * API to toggle unified meetings\n * @param {Boolean} changeState\n * @private\n * @memberof Meetings\n * @returns {undefined}\n */\n _toggleUnifiedMeetings(changeState) {\n if (typeof changeState !== 'boolean') {\n return;\n }\n if (this.config?.experimental?.enableUnifiedMeetings !== changeState) {\n this.config.experimental.enableUnifiedMeetings = changeState;\n this.meetingInfo = changeState ? new MeetingInfoV2(this.webex) : new MeetingInfo(this.webex);\n }\n }\n\n /**\n * API to toggle starting adhoc meeting\n * @param {Boolean} changeState\n * @private\n * @memberof Meetings\n * @returns {undefined}\n */\n _toggleAdhocMeetings(changeState) {\n if (typeof changeState !== 'boolean') {\n return;\n }\n if (this.config?.experimental?.enableAdhocMeetings !== changeState) {\n this.config.experimental.enableAdhocMeetings = changeState;\n }\n }\n\n /**\n * Explicitly sets up the meetings plugin by registering\n * the device, connecting to mercury, and listening for locus events.\n *\n * @returns {Promise}\n * @public\n * @memberof Meetings\n */\n register() {\n if (!this.webex.canAuthorize) {\n LoggerProxy.logger.error('Meetings:index#register --> ERROR, Unable to register, SDK cannot authorize');\n\n return Promise.reject(new Error('SDK cannot authorize'));\n }\n\n\n if (this.registered) {\n LoggerProxy.logger.info('Meetings:index#register --> INFO, Meetings plugin already registered');\n\n return Promise.resolve();\n }\n\n return Promise.all([\n this.fetchUserPreferredWebexSite(),\n this.getGeoHint(),\n this.startReachability().catch((error) => {\n LoggerProxy.logger.error(`Meetings:index#register --> GDM error, ${error.message}`);\n }),\n this.webex.internal.device.register()\n .then(() => LoggerProxy.logger.info(`Meetings:index#register --> INFO, Device registered ${this.webex.internal.device.url}`))\n .then(() => this.webex.internal.mercury.connect()),\n MeetingsUtil.checkH264Support.call(this)\n ]).then(() => {\n this.listenForEvents();\n Trigger.trigger(\n this,\n {\n file: 'meetings',\n function: 'register'\n },\n EVENT_TRIGGERS.MEETINGS_REGISTERED\n );\n this.registered = true;\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.MEETINGS_REGISTRATION_SUCCESS,\n );\n })\n .catch((error) => {\n LoggerProxy.logger.error(`Meetings:index#register --> ERROR, Unable to register, ${error.message}`);\n\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.MEETINGS_REGISTRATION_FAILED,\n {\n reason: error.message,\n stack: error.stack\n }\n );\n\n return Promise.reject(error);\n });\n }\n\n /**\n * Explicitly tears down the meetings plugin by deregistering\n * the device, disconnecting from mercury, and stops listening to locus events\n *\n * @returns {Promise}\n * @public\n * @memberof Meetings\n */\n unregister() {\n if (!this.registered) {\n LoggerProxy.logger.info('Meetings:index#unregister --> INFO, Meetings plugin already unregistered');\n\n return Promise.resolve();\n }\n\n this.stopListeningForEvents();\n\n return this.webex.internal.mercury.disconnect()\n .then(() => this.webex.internal.device.unregister())\n .then(() => {\n Trigger.trigger(\n this,\n {\n file: 'meetings',\n function: 'unregister'\n },\n EVENT_TRIGGERS.MEETINGS_UNREGISTERED\n );\n this.registered = false;\n });\n }\n\n /**\n * Uploads logs to the webex services for tracking\n * @param {Object} [options={}]\n * @param {String} [options.callStart] Call Start Time\n * @param {String} [options.feedbackId] ID used for tracking\n * @param {String} [options.locusId]\n * @param {String} [options.correlationId]\n * @param {String} [options.meetingId] webex meeting ID\n * @param {String} [options.userId] userId\n * @param {String} [options.orgId] org id\n * @returns {String} feedback ID logs were submitted under\n */\n uploadLogs(options = {}) {\n LoggerProxy.logger.info('Meetings:index#uploadLogs --> uploading logs');\n\n return this.loggerRequest.uploadLogs(options)\n .then((uploadResult) => {\n LoggerProxy.logger.info('Meetings:index#uploadLogs --> Upload logs for meeting completed.', uploadResult);\n Trigger.trigger(\n this,\n {\n file: 'meetings',\n function: 'uploadLogs'\n },\n EVENT_TRIGGERS.MEETING_LOG_UPLOAD_SUCCESS,\n {\n meetingId: options.meetingId,\n details: uploadResult\n }\n );\n })\n .catch((uploadError) => {\n LoggerProxy.logger.error('Meetings:index#uploadLogs --> Unable to upload logs for meeting', uploadError);\n Trigger.trigger(\n this,\n {\n file: 'meetings',\n function: 'uploadLogs'\n },\n EVENT_TRIGGERS.MEETING_LOG_UPLOAD_FAILURE,\n {\n meetingId: options.meetingId,\n reason: uploadError\n }\n );\n\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.UPLOAD_LOGS_FAILURE,\n {\n meetingId: options.meetingsId,\n reason: uploadError.message,\n stack: uploadError.stack,\n code: uploadError.code\n }\n );\n });\n }\n\n /**\n * initializes the reachability instance for Meetings\n * @returns {undefined}\n * @public\n * @memberof Meetings\n */\n setReachability() {\n this.reachability = new Reachability(this.webex);\n }\n\n /**\n * gets the reachability instance for Meetings\n * @returns {Reachability}\n * @public\n * @memberof Meetings\n */\n getReachability() {\n return this.reachability;\n }\n\n /**\n * initializes and starts gathering reachability for Meetings\n * @returns {Promise}\n * @public\n * @memberof Meetings\n */\n startReachability() {\n if (!this.reachability) {\n this.setReachability();\n }\n\n return this.getReachability().gatherReachability();\n }\n\n /**\n * Get geoHint for info for meetings\n * @returns {Promise}\n * @private\n * @memberof Meetings\n */\n getGeoHint() {\n return this.request.fetchGeoHint().then((res) => {\n this.geoHintInfo = res;\n });\n }\n\n /**\n * Fetch user preferred webex site information\n * This also has other infomation about the user\n * @returns {Promise}\n * @private\n * @memberof Meetings\n */\n fetchUserPreferredWebexSite() {\n return this.request.fetchLoginUserInformation().then((res) => {\n if (res && res.userPreferences) {\n this.preferredWebexSite = MeetingsUtil.parseUserPreferences(res?.userPreferences);\n }\n });\n }\n\n\n /**\n * gets the personal meeting room instance, for saved PMR values for this user\n * @returns {PersonalMeetingRoom}\n * @public\n * @memberof Meetings\n */\n\n getPersonalMeetingRoom() {\n return this.personalMeetingRoom;\n }\n\n /**\n * @param {Meeting} meeting\n * @param {Object} reason\n * @param {String} type\n * @returns {Undefined}\n * @private\n * @memberof Meetings\n */\n destroy(meeting, reason) {\n MeetingUtil.cleanUp(meeting);\n this.meetingCollection.delete(meeting.id);\n Trigger.trigger(\n this,\n {\n file: 'meetings',\n function: 'destroy'\n },\n EVENT_TRIGGERS.MEETING_REMOVED,\n {\n meetingId: meeting.id,\n reason\n }\n );\n }\n\n /**\n * Create a meeting.\n * @param {string} destination - sipURL, spaceId, phonenumber, or locus object}\n * @param {string} [type] - the optional specified type, such as locusId\n * @returns {Promise<Meeting>} A new Meeting.\n * @public\n * @memberof Meetings\n */\n create(destination, type = null) {\n // TODO: type should be from a dictionary\n\n // Validate meeting information based on the provided destination and\n // type. This must be performed prior to determining if the meeting is\n // found in the collection, as we mutate the destination for hydra person\n // id values.\n return this.meetingInfo.fetchInfoOptions(destination, type)\n // Catch a failure to fetch info options.\n .catch((error) => {\n LoggerProxy.logger.info(`Meetings:index#create --> INFO, unable to determine info options: ${error.message}`);\n })\n .then((options = {}) => {\n // Normalize the destination.\n const targetDest = options.destination || destination;\n\n // check for the conversation URL then sip Url\n let meeting = null;\n\n if (type === _CONVERSATION_URL_ || options.type === _CONVERSATION_URL_) {\n meeting = this.meetingCollection.getByKey(CONVERSATION_URL, targetDest);\n }\n\n // Attempt to collect the meeting if it exists.\n if (!meeting) {\n meeting = this.meetingCollection.getByKey(SIP_URI, targetDest);\n }\n\n\n // Validate if a meeting was found.\n if (!meeting) {\n // Create a meeting based on the normalized destination and type.\n return this.createMeeting(targetDest, type)\n .then((createdMeeting) => {\n // If the meeting was successfully created.\n if (createdMeeting && createdMeeting.on) {\n // Create a destruction event for the meeting.\n createdMeeting.on(EVENTS.DESTROY_MEETING, (payload) => {\n if (this.config.autoUploadLogs) {\n this.uploadLogs({\n callStart: createdMeeting.locusInfo?.fullState?.lastActive,\n correlationId: createdMeeting.correlationId,\n feedbackId: createdMeeting.correlationId,\n locusId: createdMeeting.locusId,\n meetingId: createdMeeting.locusInfo?.info?.webExMeetingId\n }).then(() => this.destroy(createdMeeting, payload.reason));\n }\n else {\n this.destroy(createdMeeting, payload.reason);\n }\n });\n\n createdMeeting.on(EVENTS.REQUEST_UPLOAD_LOGS, (meetingInstance) => {\n if (this.config.autoUploadLogs) {\n this.uploadLogs({\n callStart: meetingInstance?.locusInfo?.fullState?.lastActive,\n correlationId: meetingInstance.correlationId,\n feedbackId: meetingInstance.correlationId,\n locusId: meetingInstance.locusId,\n meetingId: meetingInstance.locusInfo?.info?.webExMeetingId\n });\n }\n });\n }\n else {\n LoggerProxy.logger.error(`Meetings:index#create --> ERROR, meeting does not have on method, will not be destroyed, meeting cleanup impossible for meeting: ${meeting}`);\n }\n\n // Return the newly created meeting.\n return Promise.resolve(createdMeeting);\n });\n }\n\n // Return the existing meeting.\n return Promise.resolve(meeting);\n });\n }\n\n /**\n * @param {String} destination see create()\n * @param {String} type see create()\n * @returns {Promise} a new meeting instance complete with meeting info and destination\n * @private\n * @memberof Meetings\n */\n async createMeeting(destination, type = null) {\n const meeting = new Meeting(\n {\n userId: this.webex.internal.device.userId,\n deviceUrl: this.webex.internal.device.url,\n orgId: this.webex.internal.device.orgId,\n roapSeq: 0,\n locus: type === _LOCUS_ID_ ? destination : null, // pass the locus object if present\n meetingInfoProvider: this.meetingInfo\n },\n {\n parent: this.webex\n }\n );\n\n this.meetingCollection.set(meeting);\n\n try {\n await meeting.fetchMeetingInfo({destination, type});\n }\n catch (err) {\n if (!(err instanceof CaptchaError) && !(err instanceof PasswordError)) {\n // if there is no meeting info we assume its a 1:1 call or wireless share\n LoggerProxy.logger.info(`Meetings:index#createMeeting --> Info Unable to fetch meeting info for ${destination}.`);\n LoggerProxy.logger.info('Meetings:index#createMeeting --> Info assuming this destination is a 1:1 or wireless share');\n }\n LoggerProxy.logger.debug(`Meetings:index#createMeeting --> Debug ${err} fetching /meetingInfo for creation.`);\n // We need to save this info for future reference\n meeting.destination = destination;\n }\n finally {\n // For type LOCUS_ID we need to parse the locus object to get the information\n // about the caller and callee\n // Meeting Added event will be created in `handleLocusEvent`\n if (type !== _LOCUS_ID_) {\n if (!meeting.sipUri) {\n meeting.setSipUri(destination);\n }\n\n // TODO: check if we have to move this to parser\n const meetingAddedType = MeetingsUtil.getMeetingAddedType(type);\n\n // We typically shouldn't need to trigger both and event and return a promise.\n // Is this a special case? We want to make the public API usage as simple as possible.\n Trigger.trigger(\n this,\n {\n file: 'meetings',\n function: 'createMeeting'\n },\n EVENT_TRIGGERS.MEETING_ADDED,\n {\n meeting,\n type: meetingAddedType\n }\n );\n }\n }\n\n return meeting;\n\n // Create the meeting calling the necessary service endpoints.\n\n // Internally, there are many more destinations:\n //\n // - locusID\n // - meetingURL\n // - globalMeetingID, e.g, *00*meetingID\n // - meetingID\n // - meetingURL\n // - PSTN\n // - phone number\n //\n // Our job is to determine the appropriate one\n // and its corresponding service so that developers\n // need only sipURL or spaceID to get a meeting\n // and its ID, but have the option to use createWithType()\n // and specify those types to get meetingInfo\n }\n\n /**\n * get a specifc meeting given it's type matched to the value, i.e., locus url\n * @param {String} type\n * @param {Object} value\n * @returns {Meeting}\n * @public\n * @memberof Meetings\n */\n getMeetingByType(type, value) {\n return this.meetingCollection.getByKey(type, value);\n }\n\n /**\n * Get all meetings.\n * @param {object} options\n * @param {object} options.startDate - get meetings after this start date\n * @param {object} options.endDate - get meetings before this end date\n * @returns {Object} All currently active meetings.\n * @public\n * @memberof Meetings\n */\n getAllMeetings(options = {}) {\n // Options may include other parameters to filter this collection\n // of meetings.\n return this.meetingCollection.getAll(options);\n }\n\n /**\n * syncs all the meeting from server\n * @returns {undefined}\n * @public\n * @memberof Meetings\n */\n syncMeetings() {\n return this.request.getActiveMeetings().then((locusArray) => {\n const activeLocusUrl = [];\n\n if (locusArray?.loci && locusArray.loci.length > 0) {\n locusArray.loci.forEach((locus) => {\n activeLocusUrl.push(locus.url);\n this.handleLocusEvent({\n locus,\n locusUrl: locus.url\n });\n });\n }\n const meetingsCollection = this.meetingCollection.getAll();\n\n if (Object.keys(meetingsCollection).length > 0) {\n // Some time the mercury event is missed after mercury reconnect\n // if sync returns no locus then clear all the meetings\n for (const meeting of Object.values(meetingsCollection)) {\n if (!activeLocusUrl.includes(meeting.locusUrl)) {\n // destroy function also uploads logs\n this.destroy(meeting, MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);\n }\n }\n }\n });\n }\n\n /**\n * Get all scheduled meetings.\n * @param {object} options\n * @param {object} options.startDate - get meetings after this start date\n * @param {object} options.endDate - get meetings before this end date\n * @returns {Object} All scheduled meetings.\n * @memberof Meetings\n */\n getScheduledMeetings() {\n return this.meetingCollection.getAll({scheduled: true});\n }\n\n /**\n * Get the logger instance for plugin-meetings\n * @returns {Logger}\n */\n getLogger() {\n return LoggerProxy.get();\n }\n\n /**\n * Get the Stats Analyzer singleton\n * @returns {StatsAnalyzer}\n * @public\n * @memberof Meetings\n */\n getAnalyzer() {\n return StatsAnalyzer;\n }\n\n /**\n * Get the Stats Calculator singleton\n * @returns {StatsCalculator}\n * @public\n * @memberof Meetings\n */\n getCalculator() {\n return StatsCalculator;\n }\n}\n"]}
1
+ {"version":3,"sources":["index.js"],"names":["Meetings","args","MEETINGS","request","Request","parent","webex","loggerRequest","LoggerRequest","meetingCollection","MeetingCollection","personalMeetingRoom","reachability","registered","preferredWebexSite","media","getUserMedia","Media","getSupportedDevice","onReady","MeetingsUtil","checkH264Support","disableNotifications","Metrics","initialSetup","data","meeting","getByKey","LOCUS_URL","locusUrl","CORRELATION_ID","checkForCorrelationId","internal","device","url","locus","SIP_URI","self","callbackInfo","callbackAddress","CONVERSATION_URL","conversationUrl","replaces","length","fullState","state","LOCUS","STATE","INACTIVE","LoggerProxy","logger","warn","_LEFT_","removed","create","_LOCUS_ID_","then","newMeeting","locusInfo","catch","e","console","log","finally","getMeetingByType","_ID_","id","postEvent","event","eventType","REMOTE_STARTED","trigger","MERCURY_EVENT","Trigger","file","function","EVENT_TRIGGERS","MEETING_ADDED","type","_MEETING_","_JOIN_","_INCOMING_","parse","envelope","LOCUSEVENT","MESSAGE_ROAP","handleLocusEvent","MEETINGS_NETWORK_DISCONNECTED","mercury","on","LOCUS_MERCURY","handleLocusMercury","ROAP","ROAP_MERCURY","handleRoapMercury","ONLINE","syncMeetings","OFFLINE","handleMercuryOffline","off","once","READY","StaticConfig","set","config","LoggerConfig","logging","meetingInfo","experimental","enableUnifiedMeetings","MeetingInfoV2","MeetingInfo","PersonalMeetingRoom","MEETINGS_READY","changeState","enableAdhocMeetings","canAuthorize","error","reject","Error","info","resolve","all","fetchUserPreferredWebexSite","getGeoHint","startReachability","message","register","connect","call","listenForEvents","MEETINGS_REGISTERED","sendBehavioralMetric","BEHAVIORAL_METRICS","MEETINGS_REGISTRATION_SUCCESS","MEETINGS_REGISTRATION_FAILED","reason","stack","stopListeningForEvents","disconnect","unregister","MEETINGS_UNREGISTERED","options","uploadLogs","uploadResult","MEETING_LOG_UPLOAD_SUCCESS","meetingId","details","uploadError","MEETING_LOG_UPLOAD_FAILURE","UPLOAD_LOGS_FAILURE","meetingsId","code","Reachability","setReachability","getReachability","gatherReachability","fetchGeoHint","res","geoHintInfo","fetchLoginUserInformation","userPreferences","parseUserPreferences","MeetingUtil","cleanUp","delete","MEETING_REMOVED","destination","fetchInfoOptions","targetDest","_CONVERSATION_URL_","createMeeting","createdMeeting","EVENTS","DESTROY_MEETING","payload","autoUploadLogs","callStart","lastActive","correlationId","feedbackId","locusId","webExMeetingId","destroy","REQUEST_UPLOAD_LOGS","meetingInstance","Meeting","userId","deviceUrl","orgId","roapSeq","meetingInfoProvider","destinationType","fetchMeetingInfo","CaptchaError","PasswordError","debug","sipUri","setSipUri","meetingAddedType","getMeetingAddedType","value","getAll","getActiveMeetings","locusArray","activeLocusUrl","loci","forEach","push","meetingsCollection","includes","MEETING_REMOVED_REASON","NO_MEETINGS_TO_SYNC","scheduled","get","StatsAnalyzer","StatsCalculator","WebexPlugin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;AACA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAuBA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;IACqBA,Q;;;;;AAGjB;AACJ;AACA;AACA;AACA;AACA;AACI,sBAAqB;AAAA;;AAAA;;AAAA,sCAANC,IAAM;AAANA,MAAAA,IAAM;AAAA;;AACnB,oDAASA,IA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A1B;;AACA,YAAA,OAAI,CAACoD,gBAAL,CAAsB;AACpBnD,cAAAA,KAAK,EAALA,KADoB;AAEpBN,cAAAA,QAAQ,EAAEM,KAAK,CAACD;AAFI,aAAtB;AAID,WAND;AAOD;;AACD,YAAM+K,kBAAkB,GAAG,OAAI,CAACxM,iBAAL,CAAuBiM,MAAvB,EAA3B;;AAEA,YAAI,mBAAYO,kBAAZ,EAAgCtK,MAAhC,GAAyC,CAA7C,EAAgD;AAC9C;AACA;AACA,4CAAsB,qBAAcsK,kBAAd,CAAtB,oCAAyD;AAApD,gBAAMvL,OAAO,qBAAb;;AACH,gBAAI,CAACmL,cAAc,CAACK,QAAf,CAAwBxL,OAAO,CAACG,QAAhC,CAAL,EAAgD;AAC9C;AACA,cAAA,OAAI,CAAC0J,OAAL,CAAa7J,OAAb,EAAsByL,kCAAuBC,mBAA7C;AACD;AACF;AACF;AACF,OAxBM,CAAP;AAyBD;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;;;WACI,gCAAuB;AACrB,aAAO,KAAK3M,iBAAL,CAAuBiM,MAAvB,CAA8B;AAACW,QAAAA,SAAS,EAAE;AAAZ,OAA9B,CAAP;AACD;AAED;AACJ;AACA;AACA;;;;WACI,qBAAY;AACV,aAAOpK,qBAAYqK,GAAZ,EAAP;AACD;AAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,uBAAc;AACZ,aAAOC,iBAAP;AACD;AAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,yBAAgB;AACd,aAAOC,mBAAP;AACD;;;EA/0BiCC,sB","sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n*/\n\nimport '@webex/internal-plugin-mercury';\nimport '@webex/internal-plugin-conversation';\nimport {WebexPlugin} from '@webex/webex-core';\n\nimport 'webrtc-adapter';\n\nimport Metrics from '../metrics';\nimport {trigger, eventType} from '../metrics/config';\nimport LoggerConfig from '../common/logs/logger-config';\nimport StaticConfig from '../common/config';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport LoggerRequest from '../common/logs/request';\nimport Trigger from '../common/events/trigger-proxy';\nimport Media from '../media';\nimport MeetingUtil from '../meeting/util';\nimport {\n MEETINGS,\n EVENTS,\n EVENT_TRIGGERS,\n READY,\n LOCUSEVENT,\n LOCUS_URL,\n ROAP,\n ONLINE,\n OFFLINE,\n _MEETING_,\n _JOIN_,\n _LOCUS_ID_,\n _INCOMING_,\n LOCUS,\n CORRELATION_ID,\n SIP_URI,\n _LEFT_,\n _ID_,\n MEETING_REMOVED_REASON,\n _CONVERSATION_URL_,\n CONVERSATION_URL\n} from '../constants';\nimport BEHAVIORAL_METRICS from '../metrics/constants';\nimport MeetingInfo from '../meeting-info';\nimport MeetingInfoV2 from '../meeting-info/meeting-info-v2';\nimport Meeting from '../meeting';\nimport PersonalMeetingRoom from '../personal-meeting-room';\nimport Reachability from '../reachability';\nimport Request from '../meetings/request';\nimport StatsAnalyzer from '../analyzer/analyzer';\nimport StatsCalculator from '../analyzer/calculator';\nimport PasswordError from '../common/errors/password-error';\nimport CaptchaError from '../common/errors/captcha-error';\n\nimport MeetingCollection from './collection';\nimport MeetingsUtil from './util';\n\n\n/**\n * Meetings Ready Event\n * Emitted when the meetings instance on webex is ready\n * @event meetings:ready\n * @instance\n * @memberof Meetings\n */\n\n/**\n * Meetings Network Disconnected Event\n * Emitted when the meetings instance is disconnected from\n * the internal mercury server\n * @event network:disconnected\n * @instance\n * @memberof Meetings\n */\n\n/**\n * Meetings Registered Event\n * Emitted when the meetings instance has been registered and listening\n * @event meetings:registered\n * @instance\n * @memberof Meetings\n */\n\n/**\n * Meeting Removed Event\n * Emitted when a meeting was removed from the cache of meetings\n * @event meeting:removed\n * @instance\n * @type {Object}\n * @property {String} meetingId the removed meeting\n * @property {Object} response the server response\n * @property {String} type what type of meeting it was\n * @memberof Meetings\n */\n\n/**\n * Meeting Added Event\n * Emitted when a meeting was added to the cache of meetings\n * @event meeting:added\n * @instance\n * @type {Object}\n * @property {String} meetingId the added meeting\n * @property {String} type what type of meeting it was\n * @memberof Meetings\n */\n\n/**\n * Maintain a cache of meetings and sync with services.\n * @class\n */\nexport default class Meetings extends WebexPlugin {\n namespace = MEETINGS;\n\n /**\n * Initializes the Meetings Plugin\n * @constructor\n * @public\n * @memberof Meetings\n */\n constructor(...args) {\n super(...args);\n\n /**\n * The Meetings request to interact with server\n * @instance\n * @type {Object}\n * @private\n * @memberof Meetings\n */\n this.request = new Request({}, {parent: this.webex});\n /**\n * Log upload request helper\n * @instance\n * @type {Object}\n * @private\n * @memberof Meetings\n */\n this.loggerRequest = new LoggerRequest({webex: this.webex});\n this.meetingCollection = new MeetingCollection();\n /**\n * The PersonalMeetingRoom object to interact with server\n * @instance\n * @type {Object}\n * @public\n * @memberof Meetings\n */\n this.personalMeetingRoom = null;\n /**\n * The Reachability object to interact with server, starts as null until {@link Meeting#setReachability} is called\n * starts as null\n * @instance\n * @type {Object}\n * @private\n * @memberof Meetings\n */\n this.reachability = null;\n\n /**\n * If the meetings plugin has been registered and listening via {@link Meetings#register}\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Meetings\n */\n this.registered = false;\n\n /**\n * This values indicates the preferred webex site the user will start there meeting, getsits value from {@link Meetings#register}\n * @instance\n * @type {String}\n * @private\n * @memberof Meetings\n */\n this.preferredWebexSite = '';\n\n /**\n * The public interface for the internal Media util files. These are helpful to expose outside the context\n * of a meeting so that a user can access media without creating a meeting instance.\n * @instance\n * @type {Object}\n * @private\n * @memberof Meetings\n */\n this.media = {\n getUserMedia: Media.getUserMedia,\n getSupportedDevice: Media.getSupportedDevice\n };\n\n this.onReady();\n MeetingsUtil.checkH264Support({disableNotifications: true});\n Metrics.initialSetup(this.meetingCollection, this.webex);\n }\n\n /**\n * handle locus events and takes meeting actions with them as they come in\n * @param {Object} data a locus event\n * @param {String} data.locusUrl\n * @param {Object} data.locus\n * @param {String} data.eventType\n * @returns {undefined}\n * @private\n * @memberof Meetings\n */\n handleLocusEvent(data) {\n let meeting = null;\n\n // getting meeting by correlationId. This will happen for the new event\n // Either the locus\n // TODO : Add check for the callBack Address\n meeting = this.meetingCollection.getByKey(LOCUS_URL, data.locusUrl) ||\n this.meetingCollection.getByKey(CORRELATION_ID, MeetingsUtil.checkForCorrelationId(this.webex.internal.device.url, data.locus)) ||\n this.meetingCollection.getByKey(SIP_URI, data.locus.self && data.locus.self.callbackInfo && data.locus.self.callbackInfo.callbackAddress) ||\n this.meetingCollection.getByKey(CONVERSATION_URL, data.locus.conversationUrl);\n\n // Special case when locus has got replaced, This only happend once if a replace locus exists\n // https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-changing-mid-call\n\n if (!meeting && data.locus?.replaces?.length > 0) {\n // Always the last element in the replace is the active one\n meeting = this.meetingCollection.getByKey(LOCUS_URL, data.locus.replaces[data.locus.replaces.length - 1].locusUrl);\n }\n\n if (!meeting) {\n // TODO: create meeting when we get a meeting object\n // const checkForEnded = (locus) => {\n // TODO: you already ended the meeting but you got an event later\n // Mainly for 1:1 Callsor meeting\n // Happens mainly after refresh\n\n // 1:1 Meeting\n // 1) You ended a call before but you got a mercury event\n // Make sure end the call and cleanup the meeting only if the mercury\n // event says so\n // 2) Maintain lastSync time in the meetings object which helps to compare\n // If the meeting came befor or after the sync . ANy meeting start time before the sync time is invalid\n\n // For space Meeting\n // Check the locus object and see who has joined\n\n // };\n // rather then locus object change to locus url\n\n if (data.locus && data.locus.fullState && data.locus.fullState.state === LOCUS.STATE.INACTIVE) {\n // just ignore the event as its already ended and not active\n LoggerProxy.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');\n\n return;\n }\n\n\n // When its wireless share or guest and user leaves the meeting we dont have to keep the meeting object\n // Any future events will be neglected\n\n if (data.locus && data.locus.self && (data.locus.self.state === _LEFT_ && data.locus.self.removed === true)) {\n // just ignore the event as its already ended and not active\n LoggerProxy.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');\n\n return;\n }\n\n this.create(data.locus, _LOCUS_ID_).then((newMeeting) => {\n meeting = newMeeting;\n\n // It's a new meeting so initialize the locus data\n meeting.locusInfo.initialSetup(data.locus);\n }).catch((e) => {\n console.log(e);\n })\n .finally(() => {\n // There will be cases where locus event comes in gets created and deleted because its a 1:1 and meeting gets deleted\n // because the other user left so before sending 'added' event make sure it exists in the collection\n\n if (this.getMeetingByType(_ID_, meeting.id)) {\n Metrics.postEvent({event: eventType.REMOTE_STARTED, meeting, data: {trigger: trigger.MERCURY_EVENT}});\n Trigger.trigger(\n this,\n {\n file: 'meetings',\n function: 'handleLocusEvent'\n },\n EVENT_TRIGGERS.MEETING_ADDED,\n {\n meeting,\n type: meeting.type === _MEETING_ ? _JOIN_ : _INCOMING_\n }\n );\n }\n else {\n // Meeting got added but was not found in the collection. It might have got destroyed\n LoggerProxy.logger.warn('Meetings:index#handleLocusEvent --> Created and destroyed meeting object before sending an event');\n }\n });\n }\n else {\n meeting.locusInfo.parse(meeting, data);\n }\n }\n\n /**\n * handles locus events through mercury that are not roap\n * @param {Object} envelope\n * @param {Object} envelope.data\n * @param {String} envelope.data.eventType\n * @returns {undefined}\n * @private\n * @memberof Meetings\n */\n handleLocusMercury(envelope) {\n const {data} = envelope;\n const {eventType} = data;\n\n if (eventType && eventType !== LOCUSEVENT.MESSAGE_ROAP) {\n this.handleLocusEvent(data);\n }\n }\n\n\n /**\n * handles mecury offline event\n * @returns {undefined}\n * @private\n * @memberof Meetings\n */\n handleMercuryOffline() {\n Trigger.trigger(\n this,\n {\n file: 'meetings/index',\n function: 'handleMercuryOffline'\n },\n EVENT_TRIGGERS.MEETINGS_NETWORK_DISCONNECTED,\n );\n }\n\n\n /**\n * registers for locus and roap mercury events\n * @returns {undefined}\n * @private\n * @memberof Meetings\n */\n listenForEvents() {\n this.webex.internal.mercury.on(LOCUSEVENT.LOCUS_MERCURY, (envelope) => {\n this.handleLocusMercury(envelope);\n });\n this.webex.internal.mercury.on(ROAP.ROAP_MERCURY, (envelope) => {\n MeetingsUtil.handleRoapMercury(envelope, this.meetingCollection);\n });\n\n this.webex.internal.mercury.on(ONLINE, () => {\n this.syncMeetings();\n });\n\n this.webex.internal.mercury.on(OFFLINE, () => {\n this.handleMercuryOffline();\n });\n }\n\n /**\n * stops listening for locus and roap mercury events\n * @returns {undefined}\n * @private\n * @memberof Meetings\n */\n stopListeningForEvents() {\n this.webex.internal.mercury.off(LOCUSEVENT.LOCUS_MERCURY);\n this.webex.internal.mercury.off(ROAP.ROAP_MERCURY);\n this.webex.internal.mercury.off(ONLINE);\n }\n\n /**\n * @returns {undefined}\n * @private\n * @memberof Meetings\n */\n onReady() {\n this.webex.once(READY, () => {\n StaticConfig.set(this.config);\n LoggerProxy.set(this.webex.logger);\n LoggerConfig.set(this.config.logging);\n\n /**\n * The MeetingInfo object to interact with server\n * @instance\n * @type {Object}\n * @private\n * @memberof Meetings\n */\n this.meetingInfo = this.config.experimental.enableUnifiedMeetings ? new MeetingInfoV2(this.webex) : new MeetingInfo(this.webex);\n this.personalMeetingRoom = new PersonalMeetingRoom({meetingInfo: this.meetingInfo}, {parent: this.webex});\n\n Trigger.trigger(\n this,\n {\n file: 'meetings',\n function: 'onReady'\n },\n EVENT_TRIGGERS.MEETINGS_READY\n );\n });\n }\n\n /**\n * API to toggle unified meetings\n * @param {Boolean} changeState\n * @private\n * @memberof Meetings\n * @returns {undefined}\n */\n _toggleUnifiedMeetings(changeState) {\n if (typeof changeState !== 'boolean') {\n return;\n }\n if (this.config?.experimental?.enableUnifiedMeetings !== changeState) {\n this.config.experimental.enableUnifiedMeetings = changeState;\n this.meetingInfo = changeState ? new MeetingInfoV2(this.webex) : new MeetingInfo(this.webex);\n }\n }\n\n /**\n * API to toggle starting adhoc meeting\n * @param {Boolean} changeState\n * @private\n * @memberof Meetings\n * @returns {undefined}\n */\n _toggleAdhocMeetings(changeState) {\n if (typeof changeState !== 'boolean') {\n return;\n }\n if (this.config?.experimental?.enableAdhocMeetings !== changeState) {\n this.config.experimental.enableAdhocMeetings = changeState;\n }\n }\n\n /**\n * Explicitly sets up the meetings plugin by registering\n * the device, connecting to mercury, and listening for locus events.\n *\n * @returns {Promise}\n * @public\n * @memberof Meetings\n */\n register() {\n if (!this.webex.canAuthorize) {\n LoggerProxy.logger.error('Meetings:index#register --> ERROR, Unable to register, SDK cannot authorize');\n\n return Promise.reject(new Error('SDK cannot authorize'));\n }\n\n\n if (this.registered) {\n LoggerProxy.logger.info('Meetings:index#register --> INFO, Meetings plugin already registered');\n\n return Promise.resolve();\n }\n\n return Promise.all([\n this.fetchUserPreferredWebexSite(),\n this.getGeoHint(),\n this.startReachability().catch((error) => {\n LoggerProxy.logger.error(`Meetings:index#register --> GDM error, ${error.message}`);\n }),\n this.webex.internal.device.register()\n .then(() => LoggerProxy.logger.info(`Meetings:index#register --> INFO, Device registered ${this.webex.internal.device.url}`))\n .then(() => this.webex.internal.mercury.connect()),\n MeetingsUtil.checkH264Support.call(this)\n ]).then(() => {\n this.listenForEvents();\n Trigger.trigger(\n this,\n {\n file: 'meetings',\n function: 'register'\n },\n EVENT_TRIGGERS.MEETINGS_REGISTERED\n );\n this.registered = true;\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.MEETINGS_REGISTRATION_SUCCESS,\n );\n })\n .catch((error) => {\n LoggerProxy.logger.error(`Meetings:index#register --> ERROR, Unable to register, ${error.message}`);\n\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.MEETINGS_REGISTRATION_FAILED,\n {\n reason: error.message,\n stack: error.stack\n }\n );\n\n return Promise.reject(error);\n });\n }\n\n /**\n * Explicitly tears down the meetings plugin by deregistering\n * the device, disconnecting from mercury, and stops listening to locus events\n *\n * @returns {Promise}\n * @public\n * @memberof Meetings\n */\n unregister() {\n if (!this.registered) {\n LoggerProxy.logger.info('Meetings:index#unregister --> INFO, Meetings plugin already unregistered');\n\n return Promise.resolve();\n }\n\n this.stopListeningForEvents();\n\n return this.webex.internal.mercury.disconnect()\n .then(() => this.webex.internal.device.unregister())\n .then(() => {\n Trigger.trigger(\n this,\n {\n file: 'meetings',\n function: 'unregister'\n },\n EVENT_TRIGGERS.MEETINGS_UNREGISTERED\n );\n this.registered = false;\n });\n }\n\n /**\n * Uploads logs to the webex services for tracking\n * @param {Object} [options={}]\n * @param {String} [options.callStart] Call Start Time\n * @param {String} [options.feedbackId] ID used for tracking\n * @param {String} [options.locusId]\n * @param {String} [options.correlationId]\n * @param {String} [options.meetingId] webex meeting ID\n * @param {String} [options.userId] userId\n * @param {String} [options.orgId] org id\n * @returns {String} feedback ID logs were submitted under\n */\n uploadLogs(options = {}) {\n LoggerProxy.logger.info('Meetings:index#uploadLogs --> uploading logs');\n\n return this.loggerRequest.uploadLogs(options)\n .then((uploadResult) => {\n LoggerProxy.logger.info('Meetings:index#uploadLogs --> Upload logs for meeting completed.', uploadResult);\n Trigger.trigger(\n this,\n {\n file: 'meetings',\n function: 'uploadLogs'\n },\n EVENT_TRIGGERS.MEETING_LOG_UPLOAD_SUCCESS,\n {\n meetingId: options.meetingId,\n details: uploadResult\n }\n );\n })\n .catch((uploadError) => {\n LoggerProxy.logger.error('Meetings:index#uploadLogs --> Unable to upload logs for meeting', uploadError);\n Trigger.trigger(\n this,\n {\n file: 'meetings',\n function: 'uploadLogs'\n },\n EVENT_TRIGGERS.MEETING_LOG_UPLOAD_FAILURE,\n {\n meetingId: options.meetingId,\n reason: uploadError\n }\n );\n\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.UPLOAD_LOGS_FAILURE,\n {\n meetingId: options.meetingsId,\n reason: uploadError.message,\n stack: uploadError.stack,\n code: uploadError.code\n }\n );\n });\n }\n\n /**\n * initializes the reachability instance for Meetings\n * @returns {undefined}\n * @public\n * @memberof Meetings\n */\n setReachability() {\n this.reachability = new Reachability(this.webex);\n }\n\n /**\n * gets the reachability instance for Meetings\n * @returns {Reachability}\n * @public\n * @memberof Meetings\n */\n getReachability() {\n return this.reachability;\n }\n\n /**\n * initializes and starts gathering reachability for Meetings\n * @returns {Promise}\n * @public\n * @memberof Meetings\n */\n startReachability() {\n if (!this.reachability) {\n this.setReachability();\n }\n\n return this.getReachability().gatherReachability();\n }\n\n /**\n * Get geoHint for info for meetings\n * @returns {Promise}\n * @private\n * @memberof Meetings\n */\n getGeoHint() {\n return this.request.fetchGeoHint().then((res) => {\n this.geoHintInfo = res;\n });\n }\n\n /**\n * Fetch user preferred webex site information\n * This also has other infomation about the user\n * @returns {Promise}\n * @private\n * @memberof Meetings\n */\n fetchUserPreferredWebexSite() {\n return this.request.fetchLoginUserInformation().then((res) => {\n if (res && res.userPreferences) {\n this.preferredWebexSite = MeetingsUtil.parseUserPreferences(res?.userPreferences);\n }\n });\n }\n\n\n /**\n * gets the personal meeting room instance, for saved PMR values for this user\n * @returns {PersonalMeetingRoom}\n * @public\n * @memberof Meetings\n */\n\n getPersonalMeetingRoom() {\n return this.personalMeetingRoom;\n }\n\n /**\n * @param {Meeting} meeting\n * @param {Object} reason\n * @param {String} type\n * @returns {Undefined}\n * @private\n * @memberof Meetings\n */\n destroy(meeting, reason) {\n MeetingUtil.cleanUp(meeting);\n this.meetingCollection.delete(meeting.id);\n Trigger.trigger(\n this,\n {\n file: 'meetings',\n function: 'destroy'\n },\n EVENT_TRIGGERS.MEETING_REMOVED,\n {\n meetingId: meeting.id,\n reason\n }\n );\n }\n\n /**\n * Create a meeting.\n * @param {string} destination - sipURL, spaceId, phonenumber, or locus object}\n * @param {string} [type] - the optional specified type, such as locusId\n * @returns {Promise<Meeting>} A new Meeting.\n * @public\n * @memberof Meetings\n */\n create(destination, type = null) {\n // TODO: type should be from a dictionary\n\n // Validate meeting information based on the provided destination and\n // type. This must be performed prior to determining if the meeting is\n // found in the collection, as we mutate the destination for hydra person\n // id values.\n return this.meetingInfo.fetchInfoOptions(destination, type)\n // Catch a failure to fetch info options.\n .catch((error) => {\n LoggerProxy.logger.info(`Meetings:index#create --> INFO, unable to determine info options: ${error.message}`);\n })\n .then((options = {}) => {\n // Normalize the destination.\n const targetDest = options.destination || destination;\n\n // check for the conversation URL then sip Url\n let meeting = null;\n\n if (type === _CONVERSATION_URL_ || options.type === _CONVERSATION_URL_) {\n meeting = this.meetingCollection.getByKey(CONVERSATION_URL, targetDest);\n }\n\n // Attempt to collect the meeting if it exists.\n if (!meeting) {\n meeting = this.meetingCollection.getByKey(SIP_URI, targetDest);\n }\n\n\n // Validate if a meeting was found.\n if (!meeting) {\n // Create a meeting based on the normalized destination and type.\n return this.createMeeting(targetDest, type)\n .then((createdMeeting) => {\n // If the meeting was successfully created.\n if (createdMeeting && createdMeeting.on) {\n // Create a destruction event for the meeting.\n createdMeeting.on(EVENTS.DESTROY_MEETING, (payload) => {\n if (this.config.autoUploadLogs) {\n this.uploadLogs({\n callStart: createdMeeting.locusInfo?.fullState?.lastActive,\n correlationId: createdMeeting.correlationId,\n feedbackId: createdMeeting.correlationId,\n locusId: createdMeeting.locusId,\n meetingId: createdMeeting.locusInfo?.info?.webExMeetingId\n }).then(() => this.destroy(createdMeeting, payload.reason));\n }\n else {\n this.destroy(createdMeeting, payload.reason);\n }\n });\n\n createdMeeting.on(EVENTS.REQUEST_UPLOAD_LOGS, (meetingInstance) => {\n if (this.config.autoUploadLogs) {\n this.uploadLogs({\n callStart: meetingInstance?.locusInfo?.fullState?.lastActive,\n correlationId: meetingInstance.correlationId,\n feedbackId: meetingInstance.correlationId,\n locusId: meetingInstance.locusId,\n meetingId: meetingInstance.locusInfo?.info?.webExMeetingId\n });\n }\n });\n }\n else {\n LoggerProxy.logger.error(`Meetings:index#create --> ERROR, meeting does not have on method, will not be destroyed, meeting cleanup impossible for meeting: ${meeting}`);\n }\n\n // Return the newly created meeting.\n return Promise.resolve(createdMeeting);\n });\n }\n\n // Return the existing meeting.\n return Promise.resolve(meeting);\n });\n }\n\n /**\n * @param {String} destination see create()\n * @param {String} type see create()\n * @returns {Promise} a new meeting instance complete with meeting info and destination\n * @private\n * @memberof Meetings\n */\n async createMeeting(destination, type = null) {\n const meeting = new Meeting(\n {\n userId: this.webex.internal.device.userId,\n deviceUrl: this.webex.internal.device.url,\n orgId: this.webex.internal.device.orgId,\n roapSeq: 0,\n locus: type === _LOCUS_ID_ ? destination : null, // pass the locus object if present\n meetingInfoProvider: this.meetingInfo,\n destination,\n destinationType: type,\n },\n {\n parent: this.webex\n }\n );\n\n this.meetingCollection.set(meeting);\n\n try {\n await meeting.fetchMeetingInfo({});\n }\n catch (err) {\n if (!(err instanceof CaptchaError) && !(err instanceof PasswordError)) {\n // if there is no meeting info we assume its a 1:1 call or wireless share\n LoggerProxy.logger.info(`Meetings:index#createMeeting --> Info Unable to fetch meeting info for ${destination}.`);\n LoggerProxy.logger.info('Meetings:index#createMeeting --> Info assuming this destination is a 1:1 or wireless share');\n }\n LoggerProxy.logger.debug(`Meetings:index#createMeeting --> Debug ${err} fetching /meetingInfo for creation.`);\n }\n finally {\n // For type LOCUS_ID we need to parse the locus object to get the information\n // about the caller and callee\n // Meeting Added event will be created in `handleLocusEvent`\n if (type !== _LOCUS_ID_) {\n if (!meeting.sipUri) {\n meeting.setSipUri(destination);\n }\n\n // TODO: check if we have to move this to parser\n const meetingAddedType = MeetingsUtil.getMeetingAddedType(type);\n\n // We typically shouldn't need to trigger both and event and return a promise.\n // Is this a special case? We want to make the public API usage as simple as possible.\n Trigger.trigger(\n this,\n {\n file: 'meetings',\n function: 'createMeeting'\n },\n EVENT_TRIGGERS.MEETING_ADDED,\n {\n meeting,\n type: meetingAddedType\n }\n );\n }\n }\n\n return meeting;\n\n // Create the meeting calling the necessary service endpoints.\n\n // Internally, there are many more destinations:\n //\n // - locusID\n // - meetingURL\n // - globalMeetingID, e.g, *00*meetingID\n // - meetingID\n // - meetingURL\n // - PSTN\n // - phone number\n //\n // Our job is to determine the appropriate one\n // and its corresponding service so that developers\n // need only sipURL or spaceID to get a meeting\n // and its ID, but have the option to use createWithType()\n // and specify those types to get meetingInfo\n }\n\n /**\n * get a specifc meeting given it's type matched to the value, i.e., locus url\n * @param {String} type\n * @param {Object} value\n * @returns {Meeting}\n * @public\n * @memberof Meetings\n */\n getMeetingByType(type, value) {\n return this.meetingCollection.getByKey(type, value);\n }\n\n /**\n * Get all meetings.\n * @param {object} options\n * @param {object} options.startDate - get meetings after this start date\n * @param {object} options.endDate - get meetings before this end date\n * @returns {Object} All currently active meetings.\n * @public\n * @memberof Meetings\n */\n getAllMeetings(options = {}) {\n // Options may include other parameters to filter this collection\n // of meetings.\n return this.meetingCollection.getAll(options);\n }\n\n /**\n * syncs all the meeting from server\n * @returns {undefined}\n * @public\n * @memberof Meetings\n */\n syncMeetings() {\n return this.request.getActiveMeetings().then((locusArray) => {\n const activeLocusUrl = [];\n\n if (locusArray?.loci && locusArray.loci.length > 0) {\n locusArray.loci.forEach((locus) => {\n activeLocusUrl.push(locus.url);\n this.handleLocusEvent({\n locus,\n locusUrl: locus.url\n });\n });\n }\n const meetingsCollection = this.meetingCollection.getAll();\n\n if (Object.keys(meetingsCollection).length > 0) {\n // Some time the mercury event is missed after mercury reconnect\n // if sync returns no locus then clear all the meetings\n for (const meeting of Object.values(meetingsCollection)) {\n if (!activeLocusUrl.includes(meeting.locusUrl)) {\n // destroy function also uploads logs\n this.destroy(meeting, MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);\n }\n }\n }\n });\n }\n\n /**\n * Get all scheduled meetings.\n * @param {object} options\n * @param {object} options.startDate - get meetings after this start date\n * @param {object} options.endDate - get meetings before this end date\n * @returns {Object} All scheduled meetings.\n * @memberof Meetings\n */\n getScheduledMeetings() {\n return this.meetingCollection.getAll({scheduled: true});\n }\n\n /**\n * Get the logger instance for plugin-meetings\n * @returns {Logger}\n */\n getLogger() {\n return LoggerProxy.get();\n }\n\n /**\n * Get the Stats Analyzer singleton\n * @returns {StatsAnalyzer}\n * @public\n * @memberof Meetings\n */\n getAnalyzer() {\n return StatsAnalyzer;\n }\n\n /**\n * Get the Stats Calculator singleton\n * @returns {StatsCalculator}\n * @public\n * @memberof Meetings\n */\n getCalculator() {\n return StatsCalculator;\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webex/plugin-meetings",
3
- "version": "1.159.1",
3
+ "version": "1.159.2",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -24,19 +24,19 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@babel/runtime-corejs2": "^7.14.8",
27
- "@webex/webex-core": "1.159.1",
28
- "@webex/internal-plugin-mercury": "1.159.1",
29
- "@webex/internal-plugin-conversation": "1.159.1",
27
+ "@webex/webex-core": "1.159.2",
28
+ "@webex/internal-plugin-mercury": "1.159.2",
29
+ "@webex/internal-plugin-conversation": "1.159.2",
30
30
  "webrtc-adapter": "^7.7.0",
31
31
  "lodash": "^4.17.21",
32
32
  "uuid": "^3.3.2",
33
33
  "global": "^4.4.0",
34
34
  "ip-anonymize": "^0.1.0",
35
- "@webex/common": "1.159.1",
35
+ "@webex/common": "1.159.2",
36
36
  "bowser": "^2.11.0",
37
37
  "sdp-transform": "^2.12.0",
38
38
  "readable-stream": "^3.6.0",
39
- "@webex/common-timers": "1.159.1",
39
+ "@webex/common-timers": "1.159.2",
40
40
  "btoa": "^1.2.1",
41
41
  "javascript-state-machine": "^3.1.0",
42
42
  "envify": "^4.1.0"
@@ -37,7 +37,6 @@ import {
37
37
  _CALL_,
38
38
  _INCOMING_,
39
39
  _JOIN_,
40
- _SIP_URI_,
41
40
  AUDIO,
42
41
  CONNECTION_STATE,
43
42
  CONTENT,
@@ -577,6 +576,22 @@ export default class Meeting extends StatelessWebexPlugin {
577
576
  * @memberof Meeting
578
577
  */
579
578
  this.sipUri = null;
579
+ /**
580
+ * @instance
581
+ * @type {String}
582
+ * @readonly
583
+ * @public
584
+ * @memberof Meeting
585
+ */
586
+ this.destination = attrs.destination;
587
+ /**
588
+ * @instance
589
+ * @type {String}
590
+ * @readonly
591
+ * @public
592
+ * @memberof Meeting
593
+ */
594
+ this.destinationType = attrs.destinationType;
580
595
  /**
581
596
  * @instance
582
597
  * @type {String}
@@ -901,7 +916,7 @@ export default class Meeting extends StatelessWebexPlugin {
901
916
  * @returns {Promise}
902
917
  */
903
918
  async fetchMeetingInfo({
904
- destination, type, password = null, captchaCode = null
919
+ password = null, captchaCode = null
905
920
  }) {
906
921
  if (captchaCode && !this.requiredCaptcha) {
907
922
  return Promise.reject(new Error('fetchMeetingInfo() called with captchaCode when captcha was not required'));
@@ -913,7 +928,7 @@ export default class Meeting extends StatelessWebexPlugin {
913
928
  try {
914
929
  const captchaInfo = captchaCode ? {code: captchaCode, id: this.requiredCaptcha.captchaId} : null;
915
930
 
916
- const info = await this.attrs.meetingInfoProvider.fetchMeetingInfo(destination, type, password, captchaInfo);
931
+ const info = await this.attrs.meetingInfoProvider.fetchMeetingInfo(this.destination, this.destinationType, password, captchaInfo);
917
932
 
918
933
  this.parseMeetingInfo(info);
919
934
  this.meetingInfo = info ? info.body : null;
@@ -930,7 +945,7 @@ export default class Meeting extends StatelessWebexPlugin {
930
945
  }
931
946
  catch (err) {
932
947
  if (err instanceof MeetingInfoV2PasswordError) {
933
- LoggerProxy.logger.info(`Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ${destination} - password required (code=${err?.body?.code}).`);
948
+ LoggerProxy.logger.info(`Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ${this.destination} - password required (code=${err?.body?.code}).`);
934
949
 
935
950
  // when wbxappapi requires password it still populates partial meeting info in the response
936
951
  if (err.meetingInfo) {
@@ -948,7 +963,7 @@ export default class Meeting extends StatelessWebexPlugin {
948
963
  throw (new PasswordError());
949
964
  }
950
965
  else if (err instanceof MeetingInfoV2CaptchaError) {
951
- LoggerProxy.logger.info(`Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ${destination} - captcha required (code=${err?.body?.code}).`);
966
+ LoggerProxy.logger.info(`Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ${this.destination} - captcha required (code=${err?.body?.code}).`);
952
967
 
953
968
  this.meetingInfoFailureReason = (this.requiredCaptcha) ?
954
969
  MEETING_INFO_FAILURE_REASON.WRONG_CAPTCHA :
@@ -979,7 +994,7 @@ export default class Meeting extends StatelessWebexPlugin {
979
994
  */
980
995
  verifyPassword(password, captchaCode) {
981
996
  return this.fetchMeetingInfo({
982
- destination: this.sipUri, type: _SIP_URI_, password, captchaCode
997
+ password, captchaCode
983
998
  })
984
999
  .then(() => ({isPasswordValid: true, requiredCaptcha: null, failureReason: MEETING_INFO_FAILURE_REASON.NONE}))
985
1000
  .catch((error) => {
@@ -784,7 +784,9 @@ export default class Meetings extends WebexPlugin {
784
784
  orgId: this.webex.internal.device.orgId,
785
785
  roapSeq: 0,
786
786
  locus: type === _LOCUS_ID_ ? destination : null, // pass the locus object if present
787
- meetingInfoProvider: this.meetingInfo
787
+ meetingInfoProvider: this.meetingInfo,
788
+ destination,
789
+ destinationType: type,
788
790
  },
789
791
  {
790
792
  parent: this.webex
@@ -794,7 +796,7 @@ export default class Meetings extends WebexPlugin {
794
796
  this.meetingCollection.set(meeting);
795
797
 
796
798
  try {
797
- await meeting.fetchMeetingInfo({destination, type});
799
+ await meeting.fetchMeetingInfo({});
798
800
  }
799
801
  catch (err) {
800
802
  if (!(err instanceof CaptchaError) && !(err instanceof PasswordError)) {
@@ -803,8 +805,6 @@ export default class Meetings extends WebexPlugin {
803
805
  LoggerProxy.logger.info('Meetings:index#createMeeting --> Info assuming this destination is a 1:1 or wireless share');
804
806
  }
805
807
  LoggerProxy.logger.debug(`Meetings:index#createMeeting --> Debug ${err} fetching /meetingInfo for creation.`);
806
- // We need to save this info for future reference
807
- meeting.destination = destination;
808
808
  }
809
809
  finally {
810
810
  // For type LOCUS_ID we need to parse the locus object to get the information