@webex/calling 3.11.0 → 3.12.0-llmrefactor.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.
- package/dist/CallHistory/CallHistory.js +596 -0
- package/dist/CallHistory/CallHistory.js.map +1 -0
- package/dist/CallHistory/CallHistory.test.js +916 -0
- package/dist/CallHistory/CallHistory.test.js.map +1 -0
- package/dist/CallHistory/callHistoryFixtures.js +650 -0
- package/dist/CallHistory/callHistoryFixtures.js.map +1 -0
- package/dist/CallHistory/constants.js +38 -0
- package/dist/CallHistory/constants.js.map +1 -0
- package/dist/CallHistory/types.js +7 -0
- package/dist/CallHistory/types.js.map +1 -0
- package/dist/CallRecording/CallRecording.js +160 -0
- package/dist/CallRecording/CallRecording.js.map +1 -0
- package/dist/CallRecording/CallRecording.test.js +257 -0
- package/dist/CallRecording/CallRecording.test.js.map +1 -0
- package/dist/CallRecording/WxcCallRecordingConnector.js +577 -0
- package/dist/CallRecording/WxcCallRecordingConnector.js.map +1 -0
- package/dist/CallRecording/WxcCallRecordingConnector.test.js +652 -0
- package/dist/CallRecording/WxcCallRecordingConnector.test.js.map +1 -0
- package/dist/CallRecording/callRecordingFixtures.js +235 -0
- package/dist/CallRecording/callRecordingFixtures.js.map +1 -0
- package/dist/CallRecording/constants.js +50 -0
- package/dist/CallRecording/constants.js.map +1 -0
- package/dist/CallRecording/types.js +137 -0
- package/dist/CallRecording/types.js.map +1 -0
- package/dist/CallRecording/utils.js +42 -0
- package/dist/CallRecording/utils.js.map +1 -0
- package/dist/CallRecording/utils.test.js +97 -0
- package/dist/CallRecording/utils.test.js.map +1 -0
- package/dist/CallSettings/CallSettings.js +311 -0
- package/dist/CallSettings/CallSettings.js.map +1 -0
- package/dist/CallSettings/CallSettings.test.js +122 -0
- package/dist/CallSettings/CallSettings.test.js.map +1 -0
- package/dist/CallSettings/UcmBackendConnector.js +308 -0
- package/dist/CallSettings/UcmBackendConnector.js.map +1 -0
- package/dist/CallSettings/UcmBackendConnector.test.js +411 -0
- package/dist/CallSettings/UcmBackendConnector.test.js.map +1 -0
- package/dist/CallSettings/WxCallBackendConnector.js +597 -0
- package/dist/CallSettings/WxCallBackendConnector.js.map +1 -0
- package/dist/CallSettings/WxCallBackendConnector.test.js +904 -0
- package/dist/CallSettings/WxCallBackendConnector.test.js.map +1 -0
- package/dist/CallSettings/constants.js +31 -0
- package/dist/CallSettings/constants.js.map +1 -0
- package/dist/CallSettings/testFixtures.js +68 -0
- package/dist/CallSettings/testFixtures.js.map +1 -0
- package/dist/CallSettings/types.js +7 -0
- package/dist/CallSettings/types.js.map +1 -0
- package/dist/CallingClient/CallingClient.js +1349 -0
- package/dist/CallingClient/CallingClient.js.map +1 -0
- package/dist/CallingClient/CallingClient.test.js +1625 -0
- package/dist/CallingClient/CallingClient.test.js.map +1 -0
- package/dist/CallingClient/callRecordFixtures.js +101 -0
- package/dist/CallingClient/callRecordFixtures.js.map +1 -0
- package/dist/CallingClient/calling/CallerId/index.js +275 -0
- package/dist/CallingClient/calling/CallerId/index.js.map +1 -0
- package/dist/CallingClient/calling/CallerId/index.test.js +275 -0
- package/dist/CallingClient/calling/CallerId/index.test.js.map +1 -0
- package/dist/CallingClient/calling/CallerId/types.js +7 -0
- package/dist/CallingClient/calling/CallerId/types.js.map +1 -0
- package/dist/CallingClient/calling/call.js +3666 -0
- package/dist/CallingClient/calling/call.js.map +1 -0
- package/dist/CallingClient/calling/call.test.js +3970 -0
- package/dist/CallingClient/calling/call.test.js.map +1 -0
- package/dist/CallingClient/calling/callManager.js +531 -0
- package/dist/CallingClient/calling/callManager.js.map +1 -0
- package/dist/CallingClient/calling/callManager.test.js +881 -0
- package/dist/CallingClient/calling/callManager.test.js.map +1 -0
- package/dist/CallingClient/calling/index.js +30 -0
- package/dist/CallingClient/calling/index.js.map +1 -0
- package/dist/CallingClient/calling/types.js +79 -0
- package/dist/CallingClient/calling/types.js.map +1 -0
- package/dist/CallingClient/callingClientFixtures.js +143 -0
- package/dist/CallingClient/callingClientFixtures.js.map +1 -0
- package/dist/CallingClient/constants.js +272 -0
- package/dist/CallingClient/constants.js.map +1 -0
- package/dist/CallingClient/line/index.js +339 -0
- package/dist/CallingClient/line/index.js.map +1 -0
- package/dist/CallingClient/line/line.test.js +379 -0
- package/dist/CallingClient/line/line.test.js.map +1 -0
- package/dist/CallingClient/line/types.js +21 -0
- package/dist/CallingClient/line/types.js.map +1 -0
- package/dist/CallingClient/registration/index.js +19 -0
- package/dist/CallingClient/registration/index.js.map +1 -0
- package/dist/CallingClient/registration/register.js +2079 -0
- package/dist/CallingClient/registration/register.js.map +1 -0
- package/dist/CallingClient/registration/register.test.js +2476 -0
- package/dist/CallingClient/registration/register.test.js.map +1 -0
- package/dist/CallingClient/registration/registerFixtures.js +36 -0
- package/dist/CallingClient/registration/registerFixtures.js.map +1 -0
- package/dist/CallingClient/registration/types.js +33 -0
- package/dist/CallingClient/registration/types.js.map +1 -0
- package/dist/CallingClient/registration/webWorker.js +67 -0
- package/dist/CallingClient/registration/webWorker.js.map +1 -0
- package/dist/CallingClient/registration/webWorker.test.js +189 -0
- package/dist/CallingClient/registration/webWorker.test.js.map +1 -0
- package/dist/CallingClient/registration/webWorkerStr.js +15 -0
- package/dist/CallingClient/registration/webWorkerStr.js.map +1 -0
- package/dist/CallingClient/types.js +14 -0
- package/dist/CallingClient/types.js.map +1 -0
- package/dist/CallingClient/utils/constants.js +58 -0
- package/dist/CallingClient/utils/constants.js.map +1 -0
- package/dist/CallingClient/utils/index.js +63 -0
- package/dist/CallingClient/utils/index.js.map +1 -0
- package/dist/CallingClient/utils/mobiusSocketMapper.js +122 -0
- package/dist/CallingClient/utils/mobiusSocketMapper.js.map +1 -0
- package/dist/CallingClient/utils/mobiusSocketMapper.test.js +221 -0
- package/dist/CallingClient/utils/mobiusSocketMapper.test.js.map +1 -0
- package/dist/CallingClient/utils/request.js +435 -0
- package/dist/CallingClient/utils/request.js.map +1 -0
- package/dist/CallingClient/utils/request.test.js +999 -0
- package/dist/CallingClient/utils/request.test.js.map +1 -0
- package/dist/CallingClient/utils/types.js +7 -0
- package/dist/CallingClient/utils/types.js.map +1 -0
- package/dist/CallingClient/utils/wsFeatureFlag.js +70 -0
- package/dist/CallingClient/utils/wsFeatureFlag.js.map +1 -0
- package/dist/CallingClient/utils/wsFeatureFlag.test.js +139 -0
- package/dist/CallingClient/utils/wsFeatureFlag.test.js.map +1 -0
- package/dist/CallingClient/windowsChromiumIceWarmupUtils.js +142 -0
- package/dist/CallingClient/windowsChromiumIceWarmupUtils.js.map +1 -0
- package/dist/Contacts/ContactsClient.js +1208 -0
- package/dist/Contacts/ContactsClient.js.map +1 -0
- package/dist/Contacts/ContactsClient.test.js +999 -0
- package/dist/Contacts/ContactsClient.test.js.map +1 -0
- package/dist/Contacts/constants.js +40 -0
- package/dist/Contacts/constants.js.map +1 -0
- package/dist/Contacts/contactFixtures.js +430 -0
- package/dist/Contacts/contactFixtures.js.map +1 -0
- package/dist/Contacts/types.js +43 -0
- package/dist/Contacts/types.js.map +1 -0
- package/dist/Errors/catalog/CallError.js +89 -0
- package/dist/Errors/catalog/CallError.js.map +1 -0
- package/dist/Errors/catalog/CallingDeviceError.js +83 -0
- package/dist/Errors/catalog/CallingDeviceError.js.map +1 -0
- package/dist/Errors/catalog/ExtendedError.js +42 -0
- package/dist/Errors/catalog/ExtendedError.js.map +1 -0
- package/dist/Errors/catalog/LineError.js +85 -0
- package/dist/Errors/catalog/LineError.js.map +1 -0
- package/dist/Errors/index.js +28 -0
- package/dist/Errors/index.js.map +1 -0
- package/dist/Errors/types.js +61 -0
- package/dist/Errors/types.js.map +1 -0
- package/dist/Events/impl/index.js +79 -0
- package/dist/Events/impl/index.js.map +1 -0
- package/dist/Events/types.js +134 -0
- package/dist/Events/types.js.map +1 -0
- package/dist/Logger/index.js +228 -0
- package/dist/Logger/index.js.map +1 -0
- package/dist/Logger/index.test.js +87 -0
- package/dist/Logger/index.test.js.map +1 -0
- package/dist/Logger/types.js +34 -0
- package/dist/Logger/types.js.map +1 -0
- package/dist/Metrics/index.js +595 -0
- package/dist/Metrics/index.js.map +1 -0
- package/dist/Metrics/index.test.js +819 -0
- package/dist/Metrics/index.test.js.map +1 -0
- package/dist/Metrics/types.js +82 -0
- package/dist/Metrics/types.js.map +1 -0
- package/dist/SDKConnector/index.js +102 -0
- package/dist/SDKConnector/index.js.map +1 -0
- package/dist/SDKConnector/index.test.js +9 -0
- package/dist/SDKConnector/index.test.js.map +1 -0
- package/dist/SDKConnector/types.js +7 -0
- package/dist/SDKConnector/types.js.map +1 -0
- package/dist/SDKConnector/utils.js +39 -0
- package/dist/SDKConnector/utils.js.map +1 -0
- package/dist/SDKConnector/utils.test.js +9 -0
- package/dist/SDKConnector/utils.test.js.map +1 -0
- package/dist/Voicemail/BroadworksBackendConnector.js +699 -0
- package/dist/Voicemail/BroadworksBackendConnector.js.map +1 -0
- package/dist/Voicemail/BroadworksBackendConnector.test.js +820 -0
- package/dist/Voicemail/BroadworksBackendConnector.test.js.map +1 -0
- package/dist/Voicemail/UcmBackendConnector.js +628 -0
- package/dist/Voicemail/UcmBackendConnector.js.map +1 -0
- package/dist/Voicemail/UcmBackendConnector.test.js +738 -0
- package/dist/Voicemail/UcmBackendConnector.test.js.map +1 -0
- package/dist/Voicemail/Voicemail.js +472 -0
- package/dist/Voicemail/Voicemail.js.map +1 -0
- package/dist/Voicemail/Voicemail.test.js +391 -0
- package/dist/Voicemail/Voicemail.test.js.map +1 -0
- package/dist/Voicemail/WxCallBackendConnector.js +657 -0
- package/dist/Voicemail/WxCallBackendConnector.js.map +1 -0
- package/dist/Voicemail/WxCallBackendConnector.test.js +1225 -0
- package/dist/Voicemail/WxCallBackendConnector.test.js.map +1 -0
- package/dist/Voicemail/constants.js +61 -0
- package/dist/Voicemail/constants.js.map +1 -0
- package/dist/Voicemail/types.js +7 -0
- package/dist/Voicemail/types.js.map +1 -0
- package/dist/Voicemail/voicemailFixture.js +524 -0
- package/dist/Voicemail/voicemailFixture.js.map +1 -0
- package/dist/api.js +213 -0
- package/dist/api.js.map +1 -0
- package/dist/common/Utils.js +1624 -0
- package/dist/common/Utils.js.map +1 -0
- package/dist/common/Utils.test.js +2225 -0
- package/dist/common/Utils.test.js.map +1 -0
- package/dist/common/constants.js +62 -0
- package/dist/common/constants.js.map +1 -0
- package/dist/common/index.js +19 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/testUtil.js +988 -0
- package/dist/common/testUtil.js.map +1 -0
- package/dist/common/types.js +78 -0
- package/dist/common/types.js.map +1 -0
- package/dist/index.js +452 -0
- package/dist/index.js.map +1 -0
- package/dist/mobius-socket/config.js +24 -0
- package/dist/mobius-socket/config.js.map +1 -0
- package/dist/mobius-socket/errors.js +143 -0
- package/dist/mobius-socket/errors.js.map +1 -0
- package/dist/mobius-socket/errors.test.js +20 -0
- package/dist/mobius-socket/errors.test.js.map +1 -0
- package/dist/mobius-socket/index.js +57 -0
- package/dist/mobius-socket/index.js.map +1 -0
- package/dist/mobius-socket/mobius-socket-events.test.js +492 -0
- package/dist/mobius-socket/mobius-socket-events.test.js.map +1 -0
- package/dist/mobius-socket/mobius-socket.js +849 -0
- package/dist/mobius-socket/mobius-socket.js.map +1 -0
- package/dist/mobius-socket/mobius-socket.test.js +1898 -0
- package/dist/mobius-socket/mobius-socket.test.js.map +1 -0
- package/dist/mobius-socket/socket/constants.js +55 -0
- package/dist/mobius-socket/socket/constants.js.map +1 -0
- package/dist/mobius-socket/socket/index.js +15 -0
- package/dist/mobius-socket/socket/index.js.map +1 -0
- package/dist/mobius-socket/socket/socket-base.js +604 -0
- package/dist/mobius-socket/socket/socket-base.js.map +1 -0
- package/dist/mobius-socket/socket/socket.js +19 -0
- package/dist/mobius-socket/socket/socket.js.map +1 -0
- package/dist/mobius-socket/socket/socket.shim.js +26 -0
- package/dist/mobius-socket/socket/socket.shim.js.map +1 -0
- package/dist/mobius-socket/socket/types.js +7 -0
- package/dist/mobius-socket/socket/types.js.map +1 -0
- package/dist/mobius-socket/socket.test.js +727 -0
- package/dist/mobius-socket/socket.test.js.map +1 -0
- package/dist/mobius-socket/test/mocha-helpers.js +23 -0
- package/dist/mobius-socket/test/mocha-helpers.js.map +1 -0
- package/dist/mobius-socket/test/promise-tick.js +28 -0
- package/dist/mobius-socket/test/promise-tick.js.map +1 -0
- package/dist/mobius-socket/types.js +7 -0
- package/dist/mobius-socket/types.js.map +1 -0
- package/dist/module/CallHistory/CallHistory.js +28 -17
- package/dist/module/CallRecording/CallRecording.js +56 -0
- package/dist/module/CallRecording/WxcCallRecordingConnector.js +257 -0
- package/dist/module/CallRecording/callRecordingFixtures.js +201 -0
- package/dist/module/CallRecording/constants.js +28 -0
- package/dist/module/CallRecording/types.js +19 -0
- package/dist/module/CallRecording/utils.js +14 -0
- package/dist/module/CallingClient/CallingClient.js +166 -8
- package/dist/module/CallingClient/calling/call.js +201 -68
- package/dist/module/CallingClient/calling/callManager.js +51 -11
- package/dist/module/CallingClient/calling/types.js +2 -0
- package/dist/module/CallingClient/constants.js +29 -0
- package/dist/module/CallingClient/line/index.js +4 -2
- package/dist/module/CallingClient/registration/register.js +274 -64
- package/dist/module/CallingClient/registration/types.js +5 -1
- package/dist/module/CallingClient/registration/webWorker.js +42 -61
- package/dist/module/CallingClient/registration/webWorkerStr.js +47 -82
- package/dist/module/CallingClient/utils/constants.js +36 -0
- package/dist/module/CallingClient/utils/index.js +5 -0
- package/dist/module/CallingClient/utils/mobiusSocketMapper.js +72 -0
- package/dist/module/CallingClient/utils/request.js +211 -0
- package/dist/module/CallingClient/utils/types.js +1 -0
- package/dist/module/CallingClient/utils/wsFeatureFlag.js +41 -0
- package/dist/module/Contacts/ContactsClient.js +1 -1
- package/dist/module/Errors/types.js +2 -0
- package/dist/module/Events/types.js +23 -10
- package/dist/module/Metrics/index.js +48 -1
- package/dist/module/Metrics/types.js +18 -0
- package/dist/module/api.js +3 -2
- package/dist/module/common/Utils.js +85 -22
- package/dist/module/common/testUtil.js +6 -1
- package/dist/module/common/types.js +3 -0
- package/dist/module/index.js +7 -3
- package/dist/module/mobius-socket/config.js +15 -0
- package/dist/module/mobius-socket/errors.js +58 -0
- package/dist/module/mobius-socket/index.js +24 -0
- package/dist/module/mobius-socket/mobius-socket.js +593 -0
- package/dist/module/mobius-socket/socket/constants.js +26 -0
- package/dist/module/mobius-socket/socket/index.js +4 -0
- package/dist/module/mobius-socket/socket/socket-base.js +368 -0
- package/dist/module/mobius-socket/socket/socket.js +9 -0
- package/dist/module/mobius-socket/socket/socket.shim.js +12 -0
- package/dist/module/mobius-socket/socket/types.js +1 -0
- package/dist/module/mobius-socket/types.js +1 -0
- package/dist/types/CallHistory/CallHistory.d.ts.map +1 -1
- package/dist/types/CallRecording/CallRecording.d.ts +18 -0
- package/dist/types/CallRecording/CallRecording.d.ts.map +1 -0
- package/dist/types/CallRecording/WxcCallRecordingConnector.d.ts +23 -0
- package/dist/types/CallRecording/WxcCallRecordingConnector.d.ts.map +1 -0
- package/dist/types/CallRecording/callRecordingFixtures.d.ts +61 -0
- package/dist/types/CallRecording/callRecordingFixtures.d.ts.map +1 -0
- package/dist/types/CallRecording/constants.d.ts +29 -0
- package/dist/types/CallRecording/constants.d.ts.map +1 -0
- package/dist/types/CallRecording/types.d.ts +176 -0
- package/dist/types/CallRecording/types.d.ts.map +1 -0
- package/dist/types/CallRecording/utils.d.ts +3 -0
- package/dist/types/CallRecording/utils.d.ts.map +1 -0
- package/dist/types/CallingClient/CallingClient.d.ts +10 -1
- package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/call.d.ts +17 -3
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/callManager.d.ts +8 -4
- package/dist/types/CallingClient/calling/callManager.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/types.d.ts +38 -9
- package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
- package/dist/types/CallingClient/constants.d.ts +29 -0
- package/dist/types/CallingClient/constants.d.ts.map +1 -1
- package/dist/types/CallingClient/line/index.d.ts +1 -1
- package/dist/types/CallingClient/line/index.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/register.d.ts +10 -2
- package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/types.d.ts +29 -3
- package/dist/types/CallingClient/registration/types.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/webWorker.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/webWorkerStr.d.ts +1 -1
- package/dist/types/CallingClient/registration/webWorkerStr.d.ts.map +1 -1
- package/dist/types/CallingClient/types.d.ts +6 -3
- package/dist/types/CallingClient/types.d.ts.map +1 -1
- package/dist/types/CallingClient/utils/constants.d.ts +35 -0
- package/dist/types/CallingClient/utils/constants.d.ts.map +1 -0
- package/dist/types/CallingClient/utils/index.d.ts +6 -0
- package/dist/types/CallingClient/utils/index.d.ts.map +1 -0
- package/dist/types/CallingClient/utils/mobiusSocketMapper.d.ts +5 -0
- package/dist/types/CallingClient/utils/mobiusSocketMapper.d.ts.map +1 -0
- package/dist/types/CallingClient/utils/request.d.ts +28 -0
- package/dist/types/CallingClient/utils/request.d.ts.map +1 -0
- package/dist/types/CallingClient/utils/types.d.ts +34 -0
- package/dist/types/CallingClient/utils/types.d.ts.map +1 -0
- package/dist/types/CallingClient/utils/wsFeatureFlag.d.ts +4 -0
- package/dist/types/CallingClient/utils/wsFeatureFlag.d.ts.map +1 -0
- package/dist/types/Errors/types.d.ts +2 -0
- package/dist/types/Errors/types.d.ts.map +1 -1
- package/dist/types/Events/types.d.ts +80 -16
- package/dist/types/Events/types.d.ts.map +1 -1
- package/dist/types/Metrics/index.d.ts.map +1 -1
- package/dist/types/Metrics/types.d.ts +19 -2
- package/dist/types/Metrics/types.d.ts.map +1 -1
- package/dist/types/SDKConnector/types.d.ts +39 -12
- package/dist/types/SDKConnector/types.d.ts.map +1 -1
- package/dist/types/api.d.ts +6 -4
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/common/Utils.d.ts +9 -4
- package/dist/types/common/Utils.d.ts.map +1 -1
- package/dist/types/common/testUtil.d.ts +5 -1
- package/dist/types/common/testUtil.d.ts.map +1 -1
- package/dist/types/common/types.d.ts +9 -1
- package/dist/types/common/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +9 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/mobius-socket/config.d.ts +17 -0
- package/dist/types/mobius-socket/config.d.ts.map +1 -0
- package/dist/types/mobius-socket/errors.d.ts +32 -0
- package/dist/types/mobius-socket/errors.d.ts.map +1 -0
- package/dist/types/mobius-socket/index.d.ts +14 -0
- package/dist/types/mobius-socket/index.d.ts.map +1 -0
- package/dist/types/mobius-socket/mobius-socket.d.ts +48 -0
- package/dist/types/mobius-socket/mobius-socket.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/constants.d.ts +27 -0
- package/dist/types/mobius-socket/socket/constants.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/index.d.ts +5 -0
- package/dist/types/mobius-socket/socket/index.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/socket-base.d.ts +43 -0
- package/dist/types/mobius-socket/socket/socket-base.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/socket.d.ts +6 -0
- package/dist/types/mobius-socket/socket/socket.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/socket.shim.d.ts +6 -0
- package/dist/types/mobius-socket/socket/socket.shim.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/types.d.ts +61 -0
- package/dist/types/mobius-socket/socket/types.d.ts.map +1 -0
- package/dist/types/mobius-socket/types.d.ts +21 -0
- package/dist/types/mobius-socket/types.d.ts.map +1 -0
- package/package.json +21 -5
- package/src/mobius-socket/socket/socket.shim.ts +22 -0
- package/src/mobius-socket/socket/socket.ts +14 -0
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { MediaConnectionEventNames, LocalStreamEventNames, RoapMediaConnection, } from '@webex/internal-media-core';
|
|
2
2
|
import { createMachine, interpret } from 'xstate';
|
|
3
3
|
import { v4 as uuid } from 'uuid';
|
|
4
|
-
import { EffectEvent } from '@webex/
|
|
4
|
+
import { EffectEvent } from '@webex/media-helpers';
|
|
5
5
|
import { RtcMetrics } from '@webex/internal-plugin-metrics';
|
|
6
6
|
import { ERROR_LAYER, ERROR_TYPE } from '../../Errors/types';
|
|
7
7
|
import { handleCallErrors, modifySdpForIPv4, parseMediaQualityStatistics, serviceErrorCodeHandler, uploadLogs, } from '../../common/Utils';
|
|
8
8
|
import { ALLOWED_SERVICES, CallDirection, HTTP_METHODS, } from '../../common/types';
|
|
9
9
|
import { createCallError } from '../../Errors/catalog/CallError';
|
|
10
|
-
import { CALL_ENDPOINT_RESOURCE, CALL_FILE, CALL_HOLD_SERVICE, CALL_STATUS_RESOURCE, CALL_TRANSFER_SERVICE, CALLING_USER_AGENT, CALLS_ENDPOINT_RESOURCE, CISCO_DEVICE_URL, DEFAULT_LOCAL_CALL_ID, DEFAULT_SESSION_TIMER, DEVICES_ENDPOINT_RESOURCE, HOLD_ENDPOINT, ICE_CANDIDATES_TIMEOUT, INITIAL_SEQ_NUMBER, MAX_CALL_KEEPALIVE_RETRY_COUNT, MEDIA_ENDPOINT_RESOURCE, METHODS, NOISE_REDUCTION_EFFECT, RESUME_ENDPOINT, SPARK_USER_AGENT, SUPPLEMENTARY_SERVICES_TIMEOUT, TRANSFER_ENDPOINT, } from '../constants';
|
|
10
|
+
import { CALL_ENDPOINT_RESOURCE, CALL_FILE, CALL_HOLD_SERVICE, CALL_STATUS_RESOURCE, CALL_TRANSFER_SERVICE, CALLING_USER_AGENT, CALLS_ENDPOINT_RESOURCE, CISCO_DEVICE_URL, DEFAULT_LOCAL_CALL_ID, DEFAULT_SESSION_TIMER, DEVICES_ENDPOINT_RESOURCE, HOLD_ENDPOINT, ICE_CANDIDATES_TIMEOUT, ICE_LITE_CANDIDATES_TIMEOUT, INITIAL_SEQ_NUMBER, MAX_CALL_KEEPALIVE_RETRY_COUNT, MEDIA_ENDPOINT_RESOURCE, METHODS, NOISE_REDUCTION_EFFECT, RESUME_ENDPOINT, SPARK_USER_AGENT, SUPPLEMENTARY_SERVICES_TIMEOUT, TRANSFER_ENDPOINT, } from '../constants';
|
|
11
11
|
import SDKConnector from '../../SDKConnector';
|
|
12
12
|
import { Eventing } from '../../Events/impl';
|
|
13
13
|
import { CALL_EVENT_KEYS, MEDIA_CONNECTION_EVENT_KEYS, MOBIUS_MIDCALL_STATE, SUPPLEMENTARY_SERVICES, } from '../../Events/types';
|
|
14
14
|
import { DisconnectCause, DisconnectCode, MidCallEventType, MobiusCallState, MUTE_TYPE, RoapScenario, TransferType, } from './types';
|
|
15
15
|
import log from '../../Logger';
|
|
16
16
|
import { createCallerId } from './CallerId';
|
|
17
|
-
import { METRIC_TYPE, METRIC_EVENT, TRANSFER_ACTION } from '../../Metrics/types';
|
|
17
|
+
import { METRIC_TYPE, METRIC_EVENT, TRANSFER_ACTION, MEDIA_CONNECTION_ACTION, } from '../../Metrics/types';
|
|
18
18
|
import { getMetricManager } from '../../Metrics';
|
|
19
19
|
import { METHOD_START_MESSAGE, SERVICES_ENDPOINT } from '../../common/constants';
|
|
20
|
+
import { APIRequest } from '../utils/request';
|
|
20
21
|
export class Call extends Eventing {
|
|
21
22
|
sdkConnector;
|
|
22
23
|
webex;
|
|
@@ -48,10 +49,144 @@ export class Call extends Eventing {
|
|
|
48
49
|
broadworksCorrelationInfo;
|
|
49
50
|
serviceIndicator;
|
|
50
51
|
mediaNegotiationCompleted;
|
|
52
|
+
connectPending;
|
|
51
53
|
receivedRoapOKSeq;
|
|
52
54
|
localAudioStream;
|
|
53
55
|
rtcMetrics;
|
|
54
56
|
callKeepaliveRetryCount = 0;
|
|
57
|
+
apiRequest;
|
|
58
|
+
iceGatheringConfig;
|
|
59
|
+
handleMediaRoapEvent = async (event) => {
|
|
60
|
+
log.info(`ROAP message to send (rcv from MEDIA-SDK) :
|
|
61
|
+
\n type: ${event.roapMessage?.messageType}, seq: ${event.roapMessage.seq} , version: ${event.roapMessage.version}`, { file: CALL_FILE, method: METHODS.MEDIA_ROAP_EVENTS_LISTENER });
|
|
62
|
+
log.info(`SDP message to send : \n ${event.roapMessage?.sdp}`, {
|
|
63
|
+
file: CALL_FILE,
|
|
64
|
+
method: METHODS.MEDIA_ROAP_EVENTS_LISTENER,
|
|
65
|
+
});
|
|
66
|
+
switch (event.roapMessage.messageType) {
|
|
67
|
+
case RoapScenario.OK: {
|
|
68
|
+
const mediaOk = {
|
|
69
|
+
received: false,
|
|
70
|
+
message: event.roapMessage,
|
|
71
|
+
};
|
|
72
|
+
this.sendMediaStateMachineEvt({ type: 'E_ROAP_OK', data: mediaOk });
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
case RoapScenario.OFFER: {
|
|
76
|
+
if (!event.roapMessage.sdp) {
|
|
77
|
+
log.warn('Received OFFER without SDP from media SDK', {
|
|
78
|
+
file: CALL_FILE,
|
|
79
|
+
method: METHODS.MEDIA_ROAP_EVENTS_LISTENER,
|
|
80
|
+
});
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
log.info(`before modifying sdp: ${event.roapMessage.sdp}`, {
|
|
84
|
+
file: CALL_FILE,
|
|
85
|
+
method: METHODS.MEDIA_ROAP_EVENTS_LISTENER,
|
|
86
|
+
});
|
|
87
|
+
event.roapMessage.sdp = modifySdpForIPv4(event.roapMessage.sdp);
|
|
88
|
+
const sdpVideoPortZero = event.roapMessage.sdp.replace(/^m=(video) (?:\d+) /gim, 'm=$1 0 ');
|
|
89
|
+
log.info(`after modification sdp: ${sdpVideoPortZero}`, {
|
|
90
|
+
file: CALL_FILE,
|
|
91
|
+
method: METHODS.MEDIA_ROAP_EVENTS_LISTENER,
|
|
92
|
+
});
|
|
93
|
+
event.roapMessage.sdp = sdpVideoPortZero;
|
|
94
|
+
this.localRoapMessage = event.roapMessage;
|
|
95
|
+
this.sendCallStateMachineEvt({ type: 'E_SEND_CALL_SETUP', data: event.roapMessage });
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
case RoapScenario.ANSWER:
|
|
99
|
+
if (!event.roapMessage.sdp) {
|
|
100
|
+
log.warn('Received OFFER without SDP from media SDK', {
|
|
101
|
+
file: CALL_FILE,
|
|
102
|
+
method: METHODS.MEDIA_ROAP_EVENTS_LISTENER,
|
|
103
|
+
});
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
event.roapMessage.sdp = modifySdpForIPv4(event.roapMessage.sdp);
|
|
107
|
+
this.localRoapMessage = event.roapMessage;
|
|
108
|
+
if (this.connectPending) {
|
|
109
|
+
this.sendCallStateMachineEvt({ type: 'E_SEND_CALL_CONNECT' });
|
|
110
|
+
}
|
|
111
|
+
this.sendMediaStateMachineEvt({ type: 'E_SEND_ROAP_ANSWER', data: event.roapMessage });
|
|
112
|
+
break;
|
|
113
|
+
case RoapScenario.ERROR:
|
|
114
|
+
this.sendMediaStateMachineEvt({ type: 'E_ROAP_ERROR', data: event.roapMessage });
|
|
115
|
+
break;
|
|
116
|
+
case RoapScenario.OFFER_RESPONSE:
|
|
117
|
+
if (!event.roapMessage.sdp) {
|
|
118
|
+
log.warn('Received OFFER without SDP from media SDK', {
|
|
119
|
+
file: CALL_FILE,
|
|
120
|
+
method: METHODS.MEDIA_ROAP_EVENTS_LISTENER,
|
|
121
|
+
});
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
event.roapMessage.sdp = modifySdpForIPv4(event.roapMessage.sdp);
|
|
125
|
+
this.localRoapMessage = event.roapMessage;
|
|
126
|
+
if (this.connectPending) {
|
|
127
|
+
this.sendCallStateMachineEvt({ type: 'E_SEND_CALL_CONNECT' });
|
|
128
|
+
}
|
|
129
|
+
this.sendMediaStateMachineEvt({ type: 'E_SEND_ROAP_OFFER', data: event.roapMessage });
|
|
130
|
+
break;
|
|
131
|
+
default:
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
handleRemoteTrackAdded = (event) => {
|
|
135
|
+
if (event.type === MEDIA_CONNECTION_EVENT_KEYS.MEDIA_TYPE_AUDIO) {
|
|
136
|
+
this.emit(CALL_EVENT_KEYS.REMOTE_MEDIA, event.track);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
static getPeerConnectionStateFromEvent(event, preferredKey) {
|
|
140
|
+
return event[preferredKey] || event.state || 'unknown';
|
|
141
|
+
}
|
|
142
|
+
handleIceGatheringStateChanged = (event) => {
|
|
143
|
+
const iceGatheringState = Call.getPeerConnectionStateFromEvent(event, 'iceGatheringState');
|
|
144
|
+
log.info(`ICE gathering state changed to: ${iceGatheringState}`, {
|
|
145
|
+
file: CALL_FILE,
|
|
146
|
+
method: METHODS.MEDIA_ICE_EVENTS_LISTENER,
|
|
147
|
+
});
|
|
148
|
+
this.metricManager.submitMediaMetric(METRIC_EVENT.MEDIA, MEDIA_CONNECTION_ACTION.ICE_GATHERING_STATE_CHANGED, METRIC_TYPE.BEHAVIORAL, this.callId, this.correlationId, undefined, undefined, iceGatheringState);
|
|
149
|
+
};
|
|
150
|
+
handlePeerConnectionStateChanged = (event) => {
|
|
151
|
+
const connectionState = Call.getPeerConnectionStateFromEvent(event, 'connectionState');
|
|
152
|
+
log.info(`Peer connection state changed to: ${connectionState}`, {
|
|
153
|
+
file: CALL_FILE,
|
|
154
|
+
method: METHODS.MEDIA_ICE_EVENTS_LISTENER,
|
|
155
|
+
});
|
|
156
|
+
this.metricManager.submitMediaMetric(METRIC_EVENT.MEDIA, MEDIA_CONNECTION_ACTION.PEER_CONNECTION_STATE_CHANGED, METRIC_TYPE.BEHAVIORAL, this.callId, this.correlationId, undefined, undefined, connectionState);
|
|
157
|
+
};
|
|
158
|
+
handleIceConnectionStateChanged = (event) => {
|
|
159
|
+
const iceConnectionState = Call.getPeerConnectionStateFromEvent(event, 'iceConnectionState');
|
|
160
|
+
log.info(`ICE connection state changed to: ${iceConnectionState}`, {
|
|
161
|
+
file: CALL_FILE,
|
|
162
|
+
method: METHODS.MEDIA_ICE_EVENTS_LISTENER,
|
|
163
|
+
});
|
|
164
|
+
this.metricManager.submitMediaMetric(METRIC_EVENT.MEDIA, MEDIA_CONNECTION_ACTION.ICE_CONNECTION_STATE_CHANGED, METRIC_TYPE.BEHAVIORAL, this.callId, this.correlationId, undefined, undefined, iceConnectionState);
|
|
165
|
+
};
|
|
166
|
+
handleIceCandidateError = (event) => {
|
|
167
|
+
const iceErrorPayload = {
|
|
168
|
+
address: event.address ?? null,
|
|
169
|
+
errorCode: event.errorCode,
|
|
170
|
+
errorText: event.errorText,
|
|
171
|
+
port: event.port ?? null,
|
|
172
|
+
url: event.url,
|
|
173
|
+
};
|
|
174
|
+
log.warn(`ICE candidate error occurred: ${JSON.stringify(iceErrorPayload)}`, {
|
|
175
|
+
file: CALL_FILE,
|
|
176
|
+
method: METHODS.MEDIA_ICE_EVENTS_LISTENER,
|
|
177
|
+
});
|
|
178
|
+
const callError = createCallError(`ICE candidate error occurred: ${JSON.stringify(iceErrorPayload)}`, { file: CALL_FILE, method: METHODS.MEDIA_ICE_EVENTS_LISTENER }, ERROR_TYPE.CALL_ERROR, this.correlationId, ERROR_LAYER.MEDIA);
|
|
179
|
+
this.metricManager.submitMediaMetric(METRIC_EVENT.MEDIA_ERROR, MEDIA_CONNECTION_ACTION.ICE_CANDIDATE_ERROR, METRIC_TYPE.BEHAVIORAL, this.callId, this.correlationId, undefined, undefined, undefined, callError);
|
|
180
|
+
};
|
|
181
|
+
handleRoapFailure = (error) => {
|
|
182
|
+
const failureMessage = error.message || 'Unknown ROAP failure received from media SDK';
|
|
183
|
+
log.warn(`ROAP failure occurred: ${failureMessage}`, {
|
|
184
|
+
file: CALL_FILE,
|
|
185
|
+
method: METHODS.MEDIA_ROAP_EVENTS_LISTENER,
|
|
186
|
+
});
|
|
187
|
+
const callError = createCallError(`ROAP failure occurred: ${failureMessage}`, { file: CALL_FILE, method: METHODS.MEDIA_ROAP_EVENTS_LISTENER }, ERROR_TYPE.CALL_ERROR, this.correlationId, ERROR_LAYER.MEDIA);
|
|
188
|
+
this.metricManager.submitMediaMetric(METRIC_EVENT.MEDIA_ERROR, MEDIA_CONNECTION_ACTION.ROAP_FAILURE, METRIC_TYPE.BEHAVIORAL, this.callId, this.correlationId, undefined, undefined, undefined, callError);
|
|
189
|
+
};
|
|
55
190
|
isMuted() {
|
|
56
191
|
return this.muted;
|
|
57
192
|
}
|
|
@@ -61,7 +196,7 @@ export class Call extends Eventing {
|
|
|
61
196
|
isHeld() {
|
|
62
197
|
return this.held;
|
|
63
198
|
}
|
|
64
|
-
constructor(activeUrl, webex, direction, deviceId, lineId, deleteCb, indicator, destination) {
|
|
199
|
+
constructor(activeUrl, webex, direction, deviceId, lineId, deleteCb, indicator, destination, iceGatheringConfig) {
|
|
65
200
|
super();
|
|
66
201
|
this.destination = destination;
|
|
67
202
|
this.direction = direction;
|
|
@@ -69,6 +204,7 @@ export class Call extends Eventing {
|
|
|
69
204
|
this.deviceId = deviceId;
|
|
70
205
|
this.serviceIndicator = indicator;
|
|
71
206
|
this.lineId = lineId;
|
|
207
|
+
this.iceGatheringConfig = iceGatheringConfig;
|
|
72
208
|
if (!this.sdkConnector.getWebex()) {
|
|
73
209
|
SDKConnector.setWebex(webex);
|
|
74
210
|
}
|
|
@@ -86,6 +222,7 @@ export class Call extends Eventing {
|
|
|
86
222
|
this.mobiusUrl = activeUrl;
|
|
87
223
|
this.receivedRoapOKSeq = 0;
|
|
88
224
|
this.mediaNegotiationCompleted = false;
|
|
225
|
+
this.connectPending = false;
|
|
89
226
|
log.info(`Webex Calling Url:- ${this.mobiusUrl}`, {
|
|
90
227
|
file: CALL_FILE,
|
|
91
228
|
method: METHODS.CONSTRUCTOR,
|
|
@@ -102,6 +239,7 @@ export class Call extends Eventing {
|
|
|
102
239
|
this.remoteRoapMessage = null;
|
|
103
240
|
this.disconnectReason = { code: DisconnectCode.NORMAL, cause: DisconnectCause.NORMAL };
|
|
104
241
|
this.rtcMetrics = new RtcMetrics(this.webex, { callId: this.callId }, this.correlationId);
|
|
242
|
+
this.apiRequest = APIRequest.getInstance({ webex: this.webex });
|
|
105
243
|
const callMachine = createMachine({
|
|
106
244
|
schema: {
|
|
107
245
|
context: {},
|
|
@@ -281,6 +419,11 @@ export class Call extends Eventing {
|
|
|
281
419
|
},
|
|
282
420
|
},
|
|
283
421
|
on: {
|
|
422
|
+
E_SEND_CALL_CONNECT: {
|
|
423
|
+
cond: () => this.connectPending,
|
|
424
|
+
target: 'S_SEND_CALL_CONNECT',
|
|
425
|
+
actions: ['outgoingCallConnect'],
|
|
426
|
+
},
|
|
284
427
|
E_CALL_ESTABLISHED: {
|
|
285
428
|
target: 'S_CALL_ESTABLISHED',
|
|
286
429
|
actions: ['callEstablished'],
|
|
@@ -842,6 +985,7 @@ export class Call extends Eventing {
|
|
|
842
985
|
}
|
|
843
986
|
}
|
|
844
987
|
async handleOutgoingCallConnect(event) {
|
|
988
|
+
this.connectPending = false;
|
|
845
989
|
log.info(`${METHOD_START_MESSAGE} with: ${this.getCorrelationId()}`, {
|
|
846
990
|
file: CALL_FILE,
|
|
847
991
|
method: METHODS.HANDLE_OUTGOING_CALL_CONNECT,
|
|
@@ -851,6 +995,7 @@ export class Call extends Eventing {
|
|
|
851
995
|
file: CALL_FILE,
|
|
852
996
|
method: METHODS.HANDLE_OUTGOING_CALL_CONNECT,
|
|
853
997
|
});
|
|
998
|
+
this.connectPending = true;
|
|
854
999
|
return;
|
|
855
1000
|
}
|
|
856
1001
|
try {
|
|
@@ -910,10 +1055,11 @@ export class Call extends Eventing {
|
|
|
910
1055
|
clearInterval(this.sessionTimer);
|
|
911
1056
|
}
|
|
912
1057
|
if (this.mediaConnection) {
|
|
1058
|
+
this.unregisterMediaConnectionListeners();
|
|
913
1059
|
this.mediaConnection.close();
|
|
914
1060
|
log.info('Closing media channel', {
|
|
915
1061
|
file: CALL_FILE,
|
|
916
|
-
method: METHODS.
|
|
1062
|
+
method: METHODS.HANDLE_INCOMING_CALL_DISCONNECT,
|
|
917
1063
|
});
|
|
918
1064
|
}
|
|
919
1065
|
this.sendMediaStateMachineEvt({ type: 'E_ROAP_TEARDOWN' });
|
|
@@ -953,6 +1099,7 @@ export class Call extends Eventing {
|
|
|
953
1099
|
clearInterval(this.sessionTimer);
|
|
954
1100
|
}
|
|
955
1101
|
if (this.mediaConnection) {
|
|
1102
|
+
this.unregisterMediaConnectionListeners();
|
|
956
1103
|
this.mediaConnection.close();
|
|
957
1104
|
log.info('Closing media channel', {
|
|
958
1105
|
file: CALL_FILE,
|
|
@@ -1006,6 +1153,7 @@ export class Call extends Eventing {
|
|
|
1006
1153
|
file: CALL_FILE,
|
|
1007
1154
|
method: 'scheduleCallKeepaliveInterval',
|
|
1008
1155
|
};
|
|
1156
|
+
clearInterval(this.sessionTimer);
|
|
1009
1157
|
this.sessionTimer = setInterval(async () => {
|
|
1010
1158
|
try {
|
|
1011
1159
|
const res = await this.postStatus();
|
|
@@ -1063,6 +1211,7 @@ export class Call extends Eventing {
|
|
|
1063
1211
|
clearInterval(this.sessionTimer);
|
|
1064
1212
|
}
|
|
1065
1213
|
if (this.mediaConnection) {
|
|
1214
|
+
this.unregisterMediaConnectionListeners();
|
|
1066
1215
|
this.mediaConnection.close();
|
|
1067
1216
|
log.info('Closing media channel', {
|
|
1068
1217
|
file: CALL_FILE,
|
|
@@ -1357,11 +1506,25 @@ export class Call extends Eventing {
|
|
|
1357
1506
|
});
|
|
1358
1507
|
}
|
|
1359
1508
|
};
|
|
1509
|
+
getIceCandidatesTimeout() {
|
|
1510
|
+
if (!this.iceGatheringConfig?.reduceTimeoutForIceLite) {
|
|
1511
|
+
return ICE_CANDIDATES_TIMEOUT;
|
|
1512
|
+
}
|
|
1513
|
+
const remoteSdp = this.remoteRoapMessage?.sdp;
|
|
1514
|
+
if (remoteSdp && /^a=ice-lite[\r\n]*$/im.test(remoteSdp)) {
|
|
1515
|
+
log.info('Remote offer advertises ice-lite, using reduced ICE candidates timeout', {
|
|
1516
|
+
file: CALL_FILE,
|
|
1517
|
+
method: METHODS.INIT_MEDIA_CONNECTION,
|
|
1518
|
+
});
|
|
1519
|
+
return this.iceGatheringConfig.iceLiteTimeout ?? ICE_LITE_CANDIDATES_TIMEOUT;
|
|
1520
|
+
}
|
|
1521
|
+
return ICE_CANDIDATES_TIMEOUT;
|
|
1522
|
+
}
|
|
1360
1523
|
initMediaConnection(localAudioTrack, debugId) {
|
|
1361
1524
|
const mediaConnection = new RoapMediaConnection({
|
|
1362
1525
|
skipInactiveTransceivers: true,
|
|
1363
1526
|
iceServers: [],
|
|
1364
|
-
iceCandidatesTimeout:
|
|
1527
|
+
iceCandidatesTimeout: this.getIceCandidatesTimeout(),
|
|
1365
1528
|
sdpMunging: {
|
|
1366
1529
|
convertPort9to0: true,
|
|
1367
1530
|
addContentSlides: false,
|
|
@@ -1434,6 +1597,7 @@ export class Call extends Eventing {
|
|
|
1434
1597
|
this.initMediaConnection(localAudioTrack);
|
|
1435
1598
|
this.mediaRoapEventsListener();
|
|
1436
1599
|
this.mediaTrackListener();
|
|
1600
|
+
this.mediaIceEventsListener();
|
|
1437
1601
|
this.registerListeners(localAudioStream);
|
|
1438
1602
|
}
|
|
1439
1603
|
if (this.callStateMachine.state.value === 'S_SEND_CALL_PROGRESS') {
|
|
@@ -1464,6 +1628,7 @@ export class Call extends Eventing {
|
|
|
1464
1628
|
this.initMediaConnection(localAudioTrack);
|
|
1465
1629
|
this.mediaRoapEventsListener();
|
|
1466
1630
|
this.mediaTrackListener();
|
|
1631
|
+
this.mediaIceEventsListener();
|
|
1467
1632
|
this.registerListeners(localAudioStream);
|
|
1468
1633
|
}
|
|
1469
1634
|
if (this.mediaStateMachine.state.value === 'S_ROAP_IDLE') {
|
|
@@ -1484,7 +1649,7 @@ export class Call extends Eventing {
|
|
|
1484
1649
|
mediaId: uuid(),
|
|
1485
1650
|
},
|
|
1486
1651
|
};
|
|
1487
|
-
return this.
|
|
1652
|
+
return this.apiRequest.makeRequest({
|
|
1488
1653
|
uri: `${this.mobiusUrl}${DEVICES_ENDPOINT_RESOURCE}/${this.deviceId}/${CALL_ENDPOINT_RESOURCE}`,
|
|
1489
1654
|
method: HTTP_METHODS.POST,
|
|
1490
1655
|
service: ALLOWED_SERVICES.MOBIUS,
|
|
@@ -1508,7 +1673,7 @@ export class Call extends Eventing {
|
|
|
1508
1673
|
file: CALL_FILE,
|
|
1509
1674
|
method: 'patch',
|
|
1510
1675
|
});
|
|
1511
|
-
return this.
|
|
1676
|
+
return this.apiRequest.makeRequest({
|
|
1512
1677
|
uri: `${this.mobiusUrl}${DEVICES_ENDPOINT_RESOURCE}/${this.deviceId}/${CALLS_ENDPOINT_RESOURCE}/${this.callId}`,
|
|
1513
1678
|
method: HTTP_METHODS.PATCH,
|
|
1514
1679
|
service: ALLOWED_SERVICES.MOBIUS,
|
|
@@ -1573,10 +1738,10 @@ export class Call extends Eventing {
|
|
|
1573
1738
|
});
|
|
1574
1739
|
}
|
|
1575
1740
|
}
|
|
1576
|
-
return this.
|
|
1741
|
+
return this.apiRequest.makeRequest(request);
|
|
1577
1742
|
}
|
|
1578
1743
|
async postStatus() {
|
|
1579
|
-
return this.
|
|
1744
|
+
return this.apiRequest.makeRequest({
|
|
1580
1745
|
uri: `${this.mobiusUrl}${DEVICES_ENDPOINT_RESOURCE}/${this.deviceId}/${CALLS_ENDPOINT_RESOURCE}/${this.callId}/${CALL_STATUS_RESOURCE}`,
|
|
1581
1746
|
method: HTTP_METHODS.POST,
|
|
1582
1747
|
service: ALLOWED_SERVICES.MOBIUS,
|
|
@@ -1687,7 +1852,7 @@ export class Call extends Eventing {
|
|
|
1687
1852
|
file: CALL_FILE,
|
|
1688
1853
|
method: METHODS.POST_MEDIA,
|
|
1689
1854
|
});
|
|
1690
|
-
return this.
|
|
1855
|
+
return this.apiRequest.makeRequest({
|
|
1691
1856
|
uri: `${this.mobiusUrl}${DEVICES_ENDPOINT_RESOURCE}/${this.deviceId}/${CALLS_ENDPOINT_RESOURCE}/${this.callId}/${MEDIA_ENDPOINT_RESOURCE}`,
|
|
1692
1857
|
method: HTTP_METHODS.POST,
|
|
1693
1858
|
service: ALLOWED_SERVICES.MOBIUS,
|
|
@@ -1709,61 +1874,29 @@ export class Call extends Eventing {
|
|
|
1709
1874
|
});
|
|
1710
1875
|
}
|
|
1711
1876
|
mediaRoapEventsListener() {
|
|
1712
|
-
this.mediaConnection.on(MediaConnectionEventNames.ROAP_MESSAGE_TO_SEND,
|
|
1713
|
-
|
|
1714
|
-
\n type: ${event.roapMessage?.messageType}, seq: ${event.roapMessage.seq} , version: ${event.roapMessage.version}`, { file: CALL_FILE, method: METHODS.MEDIA_ROAP_EVENTS_LISTENER });
|
|
1715
|
-
log.info(`SDP message to send : \n ${event.roapMessage?.sdp}`, {
|
|
1716
|
-
file: CALL_FILE,
|
|
1717
|
-
method: METHODS.MEDIA_ROAP_EVENTS_LISTENER,
|
|
1718
|
-
});
|
|
1719
|
-
switch (event.roapMessage.messageType) {
|
|
1720
|
-
case RoapScenario.OK: {
|
|
1721
|
-
const mediaOk = {
|
|
1722
|
-
received: false,
|
|
1723
|
-
message: event.roapMessage,
|
|
1724
|
-
};
|
|
1725
|
-
this.sendMediaStateMachineEvt({ type: 'E_ROAP_OK', data: mediaOk });
|
|
1726
|
-
break;
|
|
1727
|
-
}
|
|
1728
|
-
case RoapScenario.OFFER: {
|
|
1729
|
-
log.info(`before modifying sdp: ${event.roapMessage.sdp}`, {
|
|
1730
|
-
file: CALL_FILE,
|
|
1731
|
-
method: METHODS.MEDIA_ROAP_EVENTS_LISTENER,
|
|
1732
|
-
});
|
|
1733
|
-
event.roapMessage.sdp = modifySdpForIPv4(event.roapMessage.sdp);
|
|
1734
|
-
const sdpVideoPortZero = event.roapMessage.sdp.replace(/^m=(video) (?:\d+) /gim, 'm=$1 0 ');
|
|
1735
|
-
log.info(`after modification sdp: ${sdpVideoPortZero}`, {
|
|
1736
|
-
file: CALL_FILE,
|
|
1737
|
-
method: METHODS.MEDIA_ROAP_EVENTS_LISTENER,
|
|
1738
|
-
});
|
|
1739
|
-
event.roapMessage.sdp = sdpVideoPortZero;
|
|
1740
|
-
this.localRoapMessage = event.roapMessage;
|
|
1741
|
-
this.sendCallStateMachineEvt({ type: 'E_SEND_CALL_SETUP', data: event.roapMessage });
|
|
1742
|
-
break;
|
|
1743
|
-
}
|
|
1744
|
-
case RoapScenario.ANSWER:
|
|
1745
|
-
event.roapMessage.sdp = modifySdpForIPv4(event.roapMessage.sdp);
|
|
1746
|
-
this.localRoapMessage = event.roapMessage;
|
|
1747
|
-
this.sendMediaStateMachineEvt({ type: 'E_SEND_ROAP_ANSWER', data: event.roapMessage });
|
|
1748
|
-
break;
|
|
1749
|
-
case RoapScenario.ERROR:
|
|
1750
|
-
this.sendMediaStateMachineEvt({ type: 'E_ROAP_ERROR', data: event.roapMessage });
|
|
1751
|
-
break;
|
|
1752
|
-
case RoapScenario.OFFER_RESPONSE:
|
|
1753
|
-
event.roapMessage.sdp = modifySdpForIPv4(event.roapMessage.sdp);
|
|
1754
|
-
this.localRoapMessage = event.roapMessage;
|
|
1755
|
-
this.sendMediaStateMachineEvt({ type: 'E_SEND_ROAP_OFFER', data: event.roapMessage });
|
|
1756
|
-
break;
|
|
1757
|
-
default:
|
|
1758
|
-
}
|
|
1759
|
-
});
|
|
1877
|
+
this.mediaConnection.on(MediaConnectionEventNames.ROAP_MESSAGE_TO_SEND, this.handleMediaRoapEvent);
|
|
1878
|
+
this.mediaConnection.on(MediaConnectionEventNames.ROAP_FAILURE, this.handleRoapFailure);
|
|
1760
1879
|
}
|
|
1761
1880
|
mediaTrackListener() {
|
|
1762
|
-
this.mediaConnection.on(MediaConnectionEventNames.REMOTE_TRACK_ADDED,
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1881
|
+
this.mediaConnection.on(MediaConnectionEventNames.REMOTE_TRACK_ADDED, this.handleRemoteTrackAdded);
|
|
1882
|
+
}
|
|
1883
|
+
mediaIceEventsListener() {
|
|
1884
|
+
this.mediaConnection.on(MediaConnectionEventNames.ICE_GATHERING_STATE_CHANGED, this.handleIceGatheringStateChanged);
|
|
1885
|
+
this.mediaConnection.on(MediaConnectionEventNames.PEER_CONNECTION_STATE_CHANGED, this.handlePeerConnectionStateChanged);
|
|
1886
|
+
this.mediaConnection.on(MediaConnectionEventNames.ICE_CONNECTION_STATE_CHANGED, this.handleIceConnectionStateChanged);
|
|
1887
|
+
this.mediaConnection.on(MediaConnectionEventNames.ICE_CANDIDATE_ERROR, this.handleIceCandidateError);
|
|
1888
|
+
}
|
|
1889
|
+
unregisterMediaConnectionListeners() {
|
|
1890
|
+
if (!this.mediaConnection || typeof this.mediaConnection.off !== 'function') {
|
|
1891
|
+
return;
|
|
1892
|
+
}
|
|
1893
|
+
this.mediaConnection.off(MediaConnectionEventNames.ROAP_MESSAGE_TO_SEND, this.handleMediaRoapEvent);
|
|
1894
|
+
this.mediaConnection.off(MediaConnectionEventNames.ROAP_FAILURE, this.handleRoapFailure);
|
|
1895
|
+
this.mediaConnection.off(MediaConnectionEventNames.REMOTE_TRACK_ADDED, this.handleRemoteTrackAdded);
|
|
1896
|
+
this.mediaConnection.off(MediaConnectionEventNames.ICE_GATHERING_STATE_CHANGED, this.handleIceGatheringStateChanged);
|
|
1897
|
+
this.mediaConnection.off(MediaConnectionEventNames.PEER_CONNECTION_STATE_CHANGED, this.handlePeerConnectionStateChanged);
|
|
1898
|
+
this.mediaConnection.off(MediaConnectionEventNames.ICE_CONNECTION_STATE_CHANGED, this.handleIceConnectionStateChanged);
|
|
1899
|
+
this.mediaConnection.off(MediaConnectionEventNames.ICE_CANDIDATE_ERROR, this.handleIceCandidateError);
|
|
1767
1900
|
}
|
|
1768
1901
|
onEffectEnabled = () => {
|
|
1769
1902
|
this.metricManager.submitBNRMetric(METRIC_EVENT.BNR_ENABLED, METRIC_TYPE.BEHAVIORAL, this.callId, this.correlationId);
|
|
@@ -1777,7 +1910,7 @@ export class Call extends Eventing {
|
|
|
1777
1910
|
registerEffectListener = (addedEffect) => {
|
|
1778
1911
|
if (this.localAudioStream) {
|
|
1779
1912
|
const effect = this.localAudioStream.getEffectByKind(NOISE_REDUCTION_EFFECT);
|
|
1780
|
-
if (effect === addedEffect) {
|
|
1913
|
+
if (effect && effect === addedEffect) {
|
|
1781
1914
|
effect.on(EffectEvent.Enabled, this.onEffectEnabled);
|
|
1782
1915
|
effect.on(EffectEvent.Disabled, this.onEffectDisabled);
|
|
1783
1916
|
}
|
|
@@ -1808,7 +1941,7 @@ export class Call extends Eventing {
|
|
|
1808
1941
|
}
|
|
1809
1942
|
async delete() {
|
|
1810
1943
|
const disconnectMetrics = await this.getCallStats();
|
|
1811
|
-
return this.
|
|
1944
|
+
return this.apiRequest.makeRequest({
|
|
1812
1945
|
uri: `${this.mobiusUrl}${DEVICES_ENDPOINT_RESOURCE}/${this.deviceId}/${CALLS_ENDPOINT_RESOURCE}/${this.callId}`,
|
|
1813
1946
|
method: HTTP_METHODS.DELETE,
|
|
1814
1947
|
service: ALLOWED_SERVICES.MOBIUS,
|
|
@@ -1833,7 +1966,7 @@ export class Call extends Eventing {
|
|
|
1833
1966
|
this.metricManager.submitCallMetric(METRIC_EVENT.CALL_ERROR, transferMetricAction || this.callStateMachine.state.value.toString(), METRIC_TYPE.BEHAVIORAL, this.callId, this.correlationId, error);
|
|
1834
1967
|
}
|
|
1835
1968
|
else {
|
|
1836
|
-
this.metricManager.submitMediaMetric(METRIC_EVENT.MEDIA_ERROR, this.mediaStateMachine.state.value.toString(), METRIC_TYPE.BEHAVIORAL, this.callId, this.correlationId, this.localRoapMessage.sdp, this.remoteRoapMessage?.sdp, error);
|
|
1969
|
+
this.metricManager.submitMediaMetric(METRIC_EVENT.MEDIA_ERROR, this.mediaStateMachine.state.value.toString(), METRIC_TYPE.BEHAVIORAL, this.callId, this.correlationId, this.localRoapMessage.sdp, this.remoteRoapMessage?.sdp, undefined, error);
|
|
1837
1970
|
}
|
|
1838
1971
|
}
|
|
1839
1972
|
handleMidCallEvent(event) {
|
|
@@ -2013,4 +2146,4 @@ export class Call extends Eventing {
|
|
|
2013
2146
|
});
|
|
2014
2147
|
}
|
|
2015
2148
|
}
|
|
2016
|
-
export const createCall = (activeUrl, webex, dir, deviceId, lineId, deleteCb, indicator, dest) => new Call(activeUrl, webex, dir, deviceId, lineId, deleteCb, indicator, dest);
|
|
2149
|
+
export const createCall = (activeUrl, webex, dir, deviceId, lineId, deleteCb, indicator, dest, iceGatheringConfig) => new Call(activeUrl, webex, dir, deviceId, lineId, deleteCb, indicator, dest, iceGatheringConfig);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { APIRequest } from '../utils/request';
|
|
1
2
|
import { METHOD_START_MESSAGE } from '../../common/constants';
|
|
2
3
|
import { CALL_MANAGER_FILE, METHODS } from '../constants';
|
|
3
4
|
import { CALLING_CLIENT_EVENT_KEYS, LINE_EVENT_KEYS } from '../../Events/types';
|
|
@@ -15,15 +16,20 @@ export class CallManager extends Eventing {
|
|
|
15
16
|
activeMobiusUrl;
|
|
16
17
|
serviceIndicator;
|
|
17
18
|
lineDict;
|
|
18
|
-
|
|
19
|
+
apiRequest;
|
|
20
|
+
isMobiusSocketListenerRegistered = false;
|
|
21
|
+
iceGatheringConfig;
|
|
22
|
+
constructor(webex, indicator, iceGatheringConfig) {
|
|
19
23
|
super();
|
|
20
24
|
this.sdkConnector = SDKConnector;
|
|
21
25
|
this.serviceIndicator = indicator;
|
|
26
|
+
this.iceGatheringConfig = iceGatheringConfig;
|
|
22
27
|
if (!this.sdkConnector.getWebex()) {
|
|
23
28
|
SDKConnector.setWebex(webex);
|
|
24
29
|
}
|
|
25
30
|
this.lineDict = {};
|
|
26
31
|
this.webex = this.sdkConnector.getWebex();
|
|
32
|
+
this.apiRequest = APIRequest.getInstance({ webex: this.webex });
|
|
27
33
|
this.callCollection = {};
|
|
28
34
|
this.activeMobiusUrl = '';
|
|
29
35
|
this.listenForWsEvents();
|
|
@@ -45,7 +51,7 @@ export class CallManager extends Eventing {
|
|
|
45
51
|
method: METHODS.CREATE_CALL,
|
|
46
52
|
});
|
|
47
53
|
}
|
|
48
|
-
}, this.serviceIndicator, destination);
|
|
54
|
+
}, this.serviceIndicator, destination, this.iceGatheringConfig);
|
|
49
55
|
this.callCollection[newCall.getCorrelationId()] = newCall;
|
|
50
56
|
log.log(`New call created with correlationId: ${newCall.getCorrelationId()}`, {});
|
|
51
57
|
log.info(`ADD:: Added corelationId: ${newCall.getCorrelationId()} to CallManager , Number of call records now:- ${Object.keys(this.getActiveCalls()).length}`, {});
|
|
@@ -57,15 +63,28 @@ export class CallManager extends Eventing {
|
|
|
57
63
|
file: CALL_MANAGER_FILE,
|
|
58
64
|
method: METHODS.UPDATE_ACTIVE_MOBIUS,
|
|
59
65
|
});
|
|
66
|
+
this.listenForWsEvents();
|
|
60
67
|
}
|
|
61
68
|
listenForWsEvents() {
|
|
62
|
-
this.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
const socketEnabled = this.apiRequest.isSocketEnabled();
|
|
70
|
+
if (!socketEnabled && !this.isMobiusSocketListenerRegistered) {
|
|
71
|
+
this.sdkConnector.registerListener('event:mobius', async (event) => {
|
|
72
|
+
this.dequeueWsEvents(event);
|
|
73
|
+
});
|
|
74
|
+
this.isMobiusSocketListenerRegistered = true;
|
|
75
|
+
log.info('Successfully registered listener for Mobius events', {
|
|
76
|
+
file: CALL_MANAGER_FILE,
|
|
77
|
+
method: METHODS.REGISTER_SESSIONS_LISTENER,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
else if (socketEnabled && this.isMobiusSocketListenerRegistered) {
|
|
81
|
+
this.sdkConnector.unregisterListener('event:mobius');
|
|
82
|
+
this.isMobiusSocketListenerRegistered = false;
|
|
83
|
+
log.info('Unregistered Mercury listener for Mobius events; using WebSocket transport', {
|
|
84
|
+
file: CALL_MANAGER_FILE,
|
|
85
|
+
method: METHODS.REGISTER_SESSIONS_LISTENER,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
69
88
|
}
|
|
70
89
|
dequeueWsEvents(event) {
|
|
71
90
|
log.info(`${METHOD_START_MESSAGE} with event ${event}`, {
|
|
@@ -147,6 +166,21 @@ export class CallManager extends Eventing {
|
|
|
147
166
|
call.sendCallStateMachineEvt({ type: 'E_RECV_CALL_PROGRESS', data: mobiusEvent.data });
|
|
148
167
|
break;
|
|
149
168
|
}
|
|
169
|
+
case MobiusEventType.CALL_INFO: {
|
|
170
|
+
log.log(`Received call info mobiusEvent for call: ${correlationId}`, {
|
|
171
|
+
file: CALL_MANAGER_FILE,
|
|
172
|
+
method: METHODS.DEQUEUE_WS_EVENTS,
|
|
173
|
+
});
|
|
174
|
+
const call = this.getCall(correlationId);
|
|
175
|
+
if (call && mobiusEvent.data.callerId) {
|
|
176
|
+
log.info('Processing Caller-Id data', {
|
|
177
|
+
file: CALL_MANAGER_FILE,
|
|
178
|
+
method: METHODS.DEQUEUE_WS_EVENTS,
|
|
179
|
+
});
|
|
180
|
+
call.startCallerIdResolution(mobiusEvent.data.callerId);
|
|
181
|
+
}
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
150
184
|
case MobiusEventType.CALL_MEDIA: {
|
|
151
185
|
log.log(`Received call media mobiusEvent for call: ${correlationId}`, {
|
|
152
186
|
file: CALL_MANAGER_FILE,
|
|
@@ -301,10 +335,16 @@ export class CallManager extends Eventing {
|
|
|
301
335
|
getLineId(deviceId) {
|
|
302
336
|
return this.lineDict[deviceId].lineId;
|
|
303
337
|
}
|
|
338
|
+
setIceGatheringConfig(iceGatheringConfig) {
|
|
339
|
+
this.iceGatheringConfig = iceGatheringConfig;
|
|
340
|
+
}
|
|
304
341
|
}
|
|
305
|
-
export const getCallManager = (webex, indicator) => {
|
|
342
|
+
export const getCallManager = (webex, indicator, iceGatheringConfig) => {
|
|
306
343
|
if (!callManager) {
|
|
307
|
-
callManager = new CallManager(webex, indicator);
|
|
344
|
+
callManager = new CallManager(webex, indicator, iceGatheringConfig);
|
|
345
|
+
}
|
|
346
|
+
else if (iceGatheringConfig) {
|
|
347
|
+
callManager.setIceGatheringConfig(iceGatheringConfig);
|
|
308
348
|
}
|
|
309
349
|
return callManager;
|
|
310
350
|
};
|
|
@@ -5,6 +5,8 @@ export var MobiusEventType;
|
|
|
5
5
|
MobiusEventType["CALL_CONNECTED"] = "mobius.callconnected";
|
|
6
6
|
MobiusEventType["CALL_MEDIA"] = "mobius.media";
|
|
7
7
|
MobiusEventType["CALL_DISCONNECTED"] = "mobius.calldisconnected";
|
|
8
|
+
MobiusEventType["CALL_INFO"] = "mobius.callinfo";
|
|
9
|
+
MobiusEventType["REGISTRATION_DOWN"] = "registration.down";
|
|
8
10
|
})(MobiusEventType || (MobiusEventType = {}));
|
|
9
11
|
export var MediaState;
|
|
10
12
|
(function (MediaState) {
|
|
@@ -69,6 +69,9 @@ export const CALL_FILE = 'call';
|
|
|
69
69
|
export const CALL_MANAGER_FILE = 'callManager';
|
|
70
70
|
export const METRIC_FILE = 'metric';
|
|
71
71
|
export const REGISTRATION_FILE = 'register';
|
|
72
|
+
export const REQUEST_FILE = 'REQUEST';
|
|
73
|
+
export const MOBIUS_SOCKET_MAPPER_FILE = 'mobiusSocketMapper';
|
|
74
|
+
export const WS_FEATURE_FLAG_FILE = 'wsFeatureFlag';
|
|
72
75
|
export const CODEC_ID = 'codecId';
|
|
73
76
|
export const MEDIA_ID = 'id';
|
|
74
77
|
export const RTC_ICE_CANDIDATE_PAIR = 'RTCIceCandidatePair_';
|
|
@@ -125,7 +128,11 @@ export const MOBIUS_EU_PROD = 'mobius-eu-central-1.prod.infra.webex.com';
|
|
|
125
128
|
export const MOBIUS_US_INT = 'mobius-us-east-1.int.infra.webex.com';
|
|
126
129
|
export const MOBIUS_EU_INT = 'mobius-eu-central-1.int.infra.webex.com';
|
|
127
130
|
export const FAILOVER_CACHE_PREFIX = 'wxc-failover-state';
|
|
131
|
+
export const ACTIVE_MOBIUS_STORAGE_KEY = 'wxc-active-mobius';
|
|
128
132
|
export const ICE_CANDIDATES_TIMEOUT = 3000;
|
|
133
|
+
export const ICE_LITE_CANDIDATES_TIMEOUT = 500;
|
|
134
|
+
export const WCC_CALLING_RTMS_DOMAIN = 'wcc-calling-rtms-domain';
|
|
135
|
+
export const SESSION_SUPERSEDED_MESSAGE = 'This calling session has been superseded by another registration for the same user, for example calling opened in another browser tab or device. Calling is no longer available on this session.';
|
|
129
136
|
export const METHODS = {
|
|
130
137
|
CONSTRUCTOR: 'constructor',
|
|
131
138
|
CREATE_CALL: 'createCall',
|
|
@@ -178,6 +185,7 @@ export const METHODS = {
|
|
|
178
185
|
POST_MEDIA: 'postMedia',
|
|
179
186
|
MEDIA_ROAP_EVENTS_LISTENER: 'mediaRoapEventsListener',
|
|
180
187
|
MEDIA_TRACK_LISTENER: 'mediaTrackListener',
|
|
188
|
+
MEDIA_ICE_EVENTS_LISTENER: 'mediaIceEventsListener',
|
|
181
189
|
ON_EFFECT_ENABLED: 'onEffectEnabled',
|
|
182
190
|
ON_EFFECT_DISABLED: 'onEffectDisabled',
|
|
183
191
|
UPDATE_TRACK: 'updateTrack',
|
|
@@ -225,7 +233,28 @@ export const METHODS = {
|
|
|
225
233
|
REGISTER_SESSIONS_LISTENER: 'registerSessionsListener',
|
|
226
234
|
CREATE_LINE: 'createLine',
|
|
227
235
|
GET_LINES: 'getLines',
|
|
236
|
+
GET_DEVICES: 'getDevices',
|
|
228
237
|
UPLOAD_LOGS: 'uploadLogs',
|
|
229
238
|
GET_SDK_CONNECTOR: 'getSDKConnector',
|
|
230
239
|
GET_CONNECTED_CALL: 'getConnectedCall',
|
|
240
|
+
CONNECT_TO_MOBIUS_SOCKET: 'connectToMobiusSocket',
|
|
241
|
+
SET_SOCKET_ENABLED: 'setSocketEnabled',
|
|
242
|
+
REGISTER_MOBIUS_SOCKET_LISTENER: 'registerMobiusSocketListener',
|
|
243
|
+
UNREGISTER_MOBIUS_SOCKET_LISTENER: 'unregisterMobiusSocketListener',
|
|
244
|
+
REGISTER_MOBIUS_SOCKET_CONNECTION_LISTENER: 'registerMobiusSocketConnectionListener',
|
|
245
|
+
UNREGISTER_MOBIUS_SOCKET_CONNECTION_LISTENER: 'unregisterMobiusSocketConnectionListener',
|
|
246
|
+
HANDLE_MOBIUS_ASYNC_EVENT: 'handleMobiusAsyncEvent',
|
|
247
|
+
HANDLE_REGISTRATION_DOWN_EVENT: 'handleRegistrationDownEvent',
|
|
248
|
+
DISCONNECT_FROM_MOBIUS_SOCKET: 'disconnectFromMobiusSocket',
|
|
249
|
+
MAKE_REQUEST: 'makeRequest',
|
|
250
|
+
DERIVE_MOBIUS_SOCKET_MESSAGE_TYPE: 'deriveMobiusSocketMessageType',
|
|
251
|
+
IS_MOBIUS_WSS_ENABLED: 'isMobiusWssEnabled',
|
|
252
|
+
RESTORE_PREVIOUS_REGISTRATION: 'restorePreviousRegistration',
|
|
253
|
+
RESTART_REGISTRATION: 'restartRegistration',
|
|
254
|
+
TRIGGER_REGISTRATION: 'triggerRegistration',
|
|
255
|
+
HANDLE_404_KEEPALIVE_FAILURE: 'handle404KeepaliveFailure',
|
|
256
|
+
HANDLE_409_KEEPALIVE_FAILURE: 'handle409KeepaliveFailure',
|
|
257
|
+
INITIATE_FAILBACK: 'initiateFailback',
|
|
258
|
+
EXECUTE_FAILBACK: 'executeFailback',
|
|
259
|
+
GET_RTMS_DOMAIN: 'getRTMSDomain',
|
|
231
260
|
};
|
|
@@ -70,12 +70,12 @@ export default class Line extends Eventing {
|
|
|
70
70
|
await this.registration.triggerRegistration();
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
async deregister() {
|
|
73
|
+
async deregister(closeMobiusWss = false) {
|
|
74
74
|
log.info(METHOD_START_MESSAGE, {
|
|
75
75
|
file: LINE_FILE,
|
|
76
76
|
method: METHODS.DEREGISTER,
|
|
77
77
|
});
|
|
78
|
-
await this.registration.deregister();
|
|
78
|
+
await this.registration.deregister(closeMobiusWss);
|
|
79
79
|
this.registration.setStatus(RegistrationStatus.IDLE);
|
|
80
80
|
}
|
|
81
81
|
normalizeLine(deviceInfo) {
|
|
@@ -107,6 +107,8 @@ export default class Line extends Eventing {
|
|
|
107
107
|
}
|
|
108
108
|
break;
|
|
109
109
|
case LINE_EVENTS.UNREGISTERED:
|
|
110
|
+
this.emit(event, lineError);
|
|
111
|
+
break;
|
|
110
112
|
case LINE_EVENTS.RECONNECTED:
|
|
111
113
|
case LINE_EVENTS.RECONNECTING:
|
|
112
114
|
this.emit(event);
|