sip-connector 14.1.0-alpha.0 → 14.1.0-alpha.10

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.
Files changed (129) hide show
  1. package/dist/@SipConnector-Bkm1XX-8.cjs +1 -0
  2. package/dist/{SipConnector-CK3GgjXE.js → @SipConnector-D4tn0Ep5.js} +456 -680
  3. package/dist/{src/ApiManager → ApiManager}/@ApiManager.d.ts +2 -2
  4. package/dist/{src/ApiManager → ApiManager}/constants.d.ts +1 -1
  5. package/dist/ApiManager/index.d.ts +3 -0
  6. package/dist/{src/CallManager → CallManager}/causes.d.ts +2 -1
  7. package/dist/{src/CallManager → CallManager}/index.d.ts +2 -0
  8. package/dist/{src/CallManager → CallManager}/types.d.ts +1 -1
  9. package/dist/{src/ConnectionManager → ConnectionManager}/@ConnectionManager.d.ts +2 -1
  10. package/dist/{src/ConnectionManager → ConnectionManager}/ConnectionFlow.d.ts +2 -1
  11. package/dist/{src/IncomingCallManager → IncomingCallManager}/@IncomingCallManager.d.ts +3 -2
  12. package/dist/{src/PresentationManager → PresentationManager}/@PresentationManager.d.ts +2 -2
  13. package/dist/{src/PresentationManager → PresentationManager}/index.d.ts +1 -0
  14. package/dist/{src/SipConnector.d.ts → SipConnector/@SipConnector.d.ts} +19 -30
  15. package/dist/SipConnector/eventNames.d.ts +4 -0
  16. package/dist/SipConnector/index.d.ts +2 -0
  17. package/dist/{src/SipConnectorFacade → SipConnectorFacade}/SipConnectorFacade.d.ts +10 -28
  18. package/dist/{src/__fixtures__ → __fixtures__}/BaseSession.mock.d.ts +1 -1
  19. package/dist/{src → __fixtures__}/eventNames.d.ts +1 -1
  20. package/dist/doMock.cjs +1 -1
  21. package/dist/{src/doMock.d.ts → doMock.d.ts} +1 -1
  22. package/dist/doMock.js +212 -130
  23. package/dist/index.cjs +1 -1
  24. package/dist/{src/index.d.ts → index.d.ts} +9 -8
  25. package/dist/index.js +512 -546
  26. package/dist/{src/tools → tools}/__fixtures__/processRequest.d.ts +1 -1
  27. package/dist/{src/tools → tools}/error/getLinkError.d.ts +1 -1
  28. package/dist/{src/tools → tools}/error/getTypeFromError.d.ts +1 -1
  29. package/dist/{src/tools → tools}/error/getValuesFromError.d.ts +1 -1
  30. package/dist/{src/tools → tools}/prepareMediaStream.d.ts +1 -1
  31. package/dist/{src/tools → tools}/setVideoTrackContentHints.d.ts +1 -1
  32. package/dist/{src/tools → tools}/syncMediaState/index.d.ts +1 -1
  33. package/dist/{src/tools → tools}/syncMediaState/resolveOnStartMainCam.d.ts +1 -1
  34. package/dist/{src/tools → tools}/syncMediaState/resolveOnStartMic.d.ts +1 -1
  35. package/dist/{src/tools → tools}/syncMediaState/resolveOnStopMainCam.d.ts +1 -1
  36. package/dist/{src/tools → tools}/syncMediaState/resolveOnStopMic.d.ts +1 -1
  37. package/dist/types.d.ts +23 -0
  38. package/dist/{src/videoSendingBalancer → videoSendingBalancer}/balance.d.ts +1 -1
  39. package/dist/{src/videoSendingBalancer → videoSendingBalancer}/index.d.ts +1 -1
  40. package/dist/{src/videoSendingBalancer → videoSendingBalancer}/processSender.d.ts +1 -1
  41. package/package.json +12 -21
  42. package/dist/SipConnector-CwI8aFEA.cjs +0 -1
  43. package/dist/src/ApiManager/index.d.ts +0 -2
  44. package/dist/src/causes.d.ts +0 -23
  45. package/dist/src/headers.d.ts +0 -37
  46. package/dist/src/types.d.ts +0 -69
  47. /package/dist/{src/ApiManager → ApiManager}/eventNames.d.ts +0 -0
  48. /package/dist/{src/ApiManager → ApiManager}/types.d.ts +0 -0
  49. /package/dist/{src/CallManager → CallManager}/@CallManager.d.ts +0 -0
  50. /package/dist/{src/CallManager → CallManager}/AbstractCallStrategy.d.ts +0 -0
  51. /package/dist/{src/CallManager → CallManager}/MCUCallStrategy.d.ts +0 -0
  52. /package/dist/{src/CallManager → CallManager}/RemoteStreamsManager.d.ts +0 -0
  53. /package/dist/{src/CallManager → CallManager}/eventNames.d.ts +0 -0
  54. /package/dist/{src/CallManager → CallManager}/hasCanceledCallError.d.ts +0 -0
  55. /package/dist/{src/ConnectionManager → ConnectionManager}/ConfigurationManager.d.ts +0 -0
  56. /package/dist/{src/ConnectionManager → ConnectionManager}/ConnectionStateMachine.d.ts +0 -0
  57. /package/dist/{src/ConnectionManager → ConnectionManager}/RegistrationManager.d.ts +0 -0
  58. /package/dist/{src/ConnectionManager → ConnectionManager}/SipOperations.d.ts +0 -0
  59. /package/dist/{src/ConnectionManager → ConnectionManager}/UAFactory.d.ts +0 -0
  60. /package/dist/{src/ConnectionManager → ConnectionManager}/eventNames.d.ts +0 -0
  61. /package/dist/{src → ConnectionManager}/getExtraHeadersRemoteAddress.d.ts +0 -0
  62. /package/dist/{src/ConnectionManager → ConnectionManager}/index.d.ts +0 -0
  63. /package/dist/{src/IncomingCallManager → IncomingCallManager}/eventNames.d.ts +0 -0
  64. /package/dist/{src/IncomingCallManager → IncomingCallManager}/index.d.ts +0 -0
  65. /package/dist/{src/PresentationManager → PresentationManager}/constants.d.ts +0 -0
  66. /package/dist/{src/PresentationManager → PresentationManager}/eventNames.d.ts +0 -0
  67. /package/dist/{src/PresentationManager → PresentationManager}/types.d.ts +0 -0
  68. /package/dist/{src/SipConnectorFacade → SipConnectorFacade}/index.d.ts +0 -0
  69. /package/dist/{src/__fixtures__ → __fixtures__}/RTCPeerConnectionMock.d.ts +0 -0
  70. /package/dist/{src/__fixtures__ → __fixtures__}/RTCRtpSenderMock.d.ts +0 -0
  71. /package/dist/{src/__fixtures__ → __fixtures__}/RTCSessionMock.d.ts +0 -0
  72. /package/dist/{src/__fixtures__ → __fixtures__}/Registrator.mock.d.ts +0 -0
  73. /package/dist/{src/__fixtures__ → __fixtures__}/Request.mock.d.ts +0 -0
  74. /package/dist/{src/__fixtures__ → __fixtures__}/UA.mock.d.ts +0 -0
  75. /package/dist/{src/__fixtures__ → __fixtures__}/WebSocketInterface.mock.d.ts +0 -0
  76. /package/dist/{src/__fixtures__ → __fixtures__}/accountNotify.d.ts +0 -0
  77. /package/dist/{src/__fixtures__ → __fixtures__}/channels.d.ts +0 -0
  78. /package/dist/{src/__fixtures__ → __fixtures__}/channelsNotify.d.ts +0 -0
  79. /package/dist/{src/__fixtures__ → __fixtures__}/conferenceParticipantTokenIssuedNotify.d.ts +0 -0
  80. /package/dist/{src → __fixtures__}/constants.d.ts +0 -0
  81. /package/dist/{src/__fixtures__ → __fixtures__}/delayPromise.d.ts +0 -0
  82. /package/dist/{src/__fixtures__ → __fixtures__}/enterRoom.d.ts +0 -0
  83. /package/dist/{src/__fixtures__ → __fixtures__}/index.d.ts +0 -0
  84. /package/dist/{src/__fixtures__ → __fixtures__}/jssip.mock.d.ts +0 -0
  85. /package/dist/{src/__fixtures__ → __fixtures__}/mediaState.d.ts +0 -0
  86. /package/dist/{src/__fixtures__ → __fixtures__}/participantMoveRequests.d.ts +0 -0
  87. /package/dist/{src/__fixtures__ → __fixtures__}/participantNotify.d.ts +0 -0
  88. /package/dist/{src/__fixtures__ → __fixtures__}/remoteCallerData.d.ts +0 -0
  89. /package/dist/{src/__fixtures__ → __fixtures__}/utils.d.ts +0 -0
  90. /package/dist/{src/__fixtures__ → __fixtures__}/webcastNotify.d.ts +0 -0
  91. /package/dist/{src/logger.d.ts → logger.d.ts} +0 -0
  92. /package/dist/{src/setParametersToSender → setParametersToSender}/configureDegradationPreference.d.ts +0 -0
  93. /package/dist/{src/setParametersToSender → setParametersToSender}/configureEmptyEncodings.d.ts +0 -0
  94. /package/dist/{src/setParametersToSender → setParametersToSender}/configureEncodings.d.ts +0 -0
  95. /package/dist/{src/setParametersToSender → setParametersToSender}/configureMaxBitrate.d.ts +0 -0
  96. /package/dist/{src/setParametersToSender → setParametersToSender}/configureScaleResolutionDownBy.d.ts +0 -0
  97. /package/dist/{src/setParametersToSender → setParametersToSender}/hasChangedRTCRtpSendParameters.d.ts +0 -0
  98. /package/dist/{src/setParametersToSender → setParametersToSender}/index.d.ts +0 -0
  99. /package/dist/{src/setParametersToSender → setParametersToSender}/resolveHasNeedToUpdateItemEncoding.d.ts +0 -0
  100. /package/dist/{src/setParametersToSender → setParametersToSender}/setParametersToSender.d.ts +0 -0
  101. /package/dist/{src/tools → tools}/__fixtures__/call.d.ts +0 -0
  102. /package/dist/{src/tools → tools}/__fixtures__/connectToServer.d.ts +0 -0
  103. /package/dist/{src/tools → tools}/__fixtures__/hasValidUri.d.ts +0 -0
  104. /package/dist/{src/tools → tools}/__fixtures__/permissions.d.ts +0 -0
  105. /package/dist/{src/tools → tools}/__tests-utils__/parseObject.d.ts +0 -0
  106. /package/dist/{src/tools → tools}/__tests-utils__/resolveParseArray.d.ts +0 -0
  107. /package/dist/{src/tools → tools}/error/index.d.ts +0 -0
  108. /package/dist/{src/tools → tools}/error/stringifyMessage.d.ts +0 -0
  109. /package/dist/{src/tools → tools}/generateSimulcastEncodings.d.ts +0 -0
  110. /package/dist/{src/tools → tools}/getExtraHeaders.d.ts +0 -0
  111. /package/dist/{src/tools → tools}/getUserAgent.d.ts +0 -0
  112. /package/dist/{src/tools → tools}/hasPurgatory.d.ts +0 -0
  113. /package/dist/{src/tools → tools}/index.d.ts +0 -0
  114. /package/dist/{src/tools → tools}/resolveUpdateTransceiver.d.ts +0 -0
  115. /package/dist/{src/tools → tools}/sendDtmfFAccumulated.d.ts +0 -0
  116. /package/dist/{src/utils → utils}/errors.d.ts +0 -0
  117. /package/dist/{src/utils → utils}/findSenderByStream.d.ts +0 -0
  118. /package/dist/{src/utils → utils}/findVideoSender.d.ts +0 -0
  119. /package/dist/{src/utils → utils}/findVideoTrack.d.ts +0 -0
  120. /package/dist/{src/utils → utils}/getCodecFromSender.d.ts +0 -0
  121. /package/dist/{src/utils → utils}/replaceForbiddenSymbolsWithUnderscore.d.ts +0 -0
  122. /package/dist/{src/videoSendingBalancer → videoSendingBalancer}/getMaxBitrateByWidth.d.ts +0 -0
  123. /package/dist/{src/videoSendingBalancer → videoSendingBalancer}/getMaxBitrateByWidthAndCodec.d.ts +0 -0
  124. /package/dist/{src/videoSendingBalancer → videoSendingBalancer}/hasAv1Codec.d.ts +0 -0
  125. /package/dist/{src/videoSendingBalancer → videoSendingBalancer}/hasIncludesString.d.ts +0 -0
  126. /package/dist/{src/videoSendingBalancer → videoSendingBalancer}/scaleBitrate.d.ts +0 -0
  127. /package/dist/{src/videoSendingBalancer → videoSendingBalancer}/scaleBitrateByCodec.d.ts +0 -0
  128. /package/dist/{src/videoSendingBalancer → videoSendingBalancer}/scaleResolutionAndBitrate.d.ts +0 -0
  129. /package/dist/{src/videoSendingBalancer → videoSendingBalancer}/setEncodingsToSender.d.ts +0 -0
@@ -1,9 +1,9 @@
1
1
  import { CallManager } from '../CallManager';
2
2
  import { ConnectionManager } from '../ConnectionManager';
3
- import { TEvent } from './eventNames';
3
+ import { TEvent, TEvents } from './eventNames';
4
4
  import { TChannels, TMediaState, TOptionsInfoMediaState } from './types';
5
5
  declare class ApiManager {
6
- private readonly events;
6
+ readonly events: TEvents;
7
7
  private readonly connectionManager;
8
8
  private readonly callManager;
9
9
  constructor({ connectionManager, callManager, }: {
@@ -1,5 +1,5 @@
1
1
  export declare enum EHeader {
2
- CONTENT_TYPE_NAME = "content-type",
2
+ CONTENT_TYPE = "content-type",
3
3
  CONTENT_ENTER_ROOM = "x-webrtc-enter-room",
4
4
  CONTENT_USE_LICENSE = "X-WEBRTC-USE-LICENSE",
5
5
  PARTICIPANT_NAME = "X-WEBRTC-PARTICIPANT-NAME",
@@ -0,0 +1,3 @@
1
+ export { default as ApiManager } from './@ApiManager';
2
+ export { EContentTypeReceived, EContentTypeSent, EEventsMainCAM, EEventsMic, EEventsSyncMediaState, EHeader, EShareState, EUseLicense, } from './constants';
3
+ export type { TEvent as TApiEvent } from './eventNames';
@@ -8,5 +8,6 @@ export declare enum ECallCause {
8
8
  UNAVAILABLE = "Unavailable",
9
9
  NOT_FOUND = "Not Found",
10
10
  ADDRESS_INCOMPLETE = "Address Incomplete",
11
- INCOMPATIBLE_SDP = "Incompatible SDP"
11
+ INCOMPATIBLE_SDP = "Incompatible SDP",
12
+ BAD_MEDIA_DESCRIPTION = "Bad Media Description"
12
13
  }
@@ -1,5 +1,7 @@
1
1
  export { default as CallManager } from './@CallManager';
2
+ export { ECallCause } from './causes';
2
3
  export { EEvent as ECallEvent, Originator } from './eventNames';
3
4
  export type { TEvent as TCallEvent, TEvents as TCallEvents } from './eventNames';
4
5
  export { default as hasCanceledCallError } from './hasCanceledCallError';
5
6
  export { MCUCallStrategy } from './MCUCallStrategy';
7
+ export type { TCustomError, TGetServerUrl } from './types';
@@ -1,8 +1,8 @@
1
1
  import { RTCSession, UA } from '@krivega/jssip';
2
+ import { TContentHint } from '../PresentationManager';
2
3
  import { Originator } from './eventNames';
3
4
  export type TOntrack = (track: RTCTrackEvent) => void;
4
5
  export type TOnAddedTransceiver = (transceiver: RTCRtpTransceiver, track: MediaStreamTrack, stream: MediaStream) => Promise<void>;
5
- export type TContentHint = 'motion' | 'detail' | 'text' | 'none';
6
6
  export type TGetServerUrl = (id: string) => string;
7
7
  type TOptionsExtraHeaders = {
8
8
  extraHeaders?: string[];
@@ -1,6 +1,7 @@
1
1
  import { RegisteredEvent, UA, UnRegisteredEvent, WebSocketInterface } from '@krivega/jssip';
2
2
  import { default as Events } from 'events-constructor';
3
- import { TGetServerUrl, TJsSIP } from '../types';
3
+ import { TGetServerUrl } from '../CallManager';
4
+ import { TJsSIP } from '../types';
4
5
  import { TConnect, TSet } from './ConnectionFlow';
5
6
  import { TEvent, EVENT_NAMES } from './eventNames';
6
7
  import { TParametersCheckTelephony, default as SipOperations } from './SipOperations';
@@ -1,6 +1,7 @@
1
1
  import { UA, WebSocketInterface } from '@krivega/jssip';
2
2
  import { default as Events } from 'events-constructor';
3
- import { TGetServerUrl, TJsSIP } from '../types';
3
+ import { TGetServerUrl } from '../CallManager';
4
+ import { TJsSIP } from '../types';
4
5
  import { default as ConnectionStateMachine } from './ConnectionStateMachine';
5
6
  import { EVENT_NAMES } from './eventNames';
6
7
  import { default as RegistrationManager } from './RegistrationManager';
@@ -1,6 +1,7 @@
1
1
  import { RTCSession } from '@krivega/jssip';
2
+ import { default as Events } from 'events-constructor';
2
3
  import { ConnectionManager } from '../ConnectionManager';
3
- import { TEvent } from './eventNames';
4
+ import { TEvent, EVENT_NAMES } from './eventNames';
4
5
  type TRemoteCallerData = {
5
6
  displayName?: string;
6
7
  host?: string;
@@ -8,9 +9,9 @@ type TRemoteCallerData = {
8
9
  rtcSession?: RTCSession;
9
10
  };
10
11
  export default class IncomingCallManager {
12
+ readonly events: Events<typeof EVENT_NAMES>;
11
13
  private incomingRTCSession?;
12
14
  private readonly connectionManager;
13
- private readonly events;
14
15
  constructor(connectionManager: ConnectionManager);
15
16
  get remoteCallerData(): TRemoteCallerData;
16
17
  get isAvailableIncomingCall(): boolean;
@@ -1,12 +1,12 @@
1
1
  import { CallManager } from '../CallManager';
2
- import { TEvent } from './eventNames';
2
+ import { TEvent, TEvents } from './eventNames';
3
3
  import { TContentHint, TOnAddedTransceiver } from './types';
4
4
  export declare const hasCanceledStartPresentationError: (error: unknown) => error is import('repeated-calls').TCanceledError<unknown>;
5
5
  declare class PresentationManager {
6
+ readonly events: TEvents;
6
7
  promisePendingStartPresentation?: Promise<MediaStream>;
7
8
  promisePendingStopPresentation?: Promise<MediaStream | undefined>;
8
9
  streamPresentationCurrent?: MediaStream;
9
- private readonly events;
10
10
  private cancelableSendPresentationWithRepeatedCalls;
11
11
  private readonly callManager;
12
12
  constructor({ callManager }: {
@@ -1 +1,2 @@
1
1
  export { hasCanceledStartPresentationError, default as PresentationManager, } from './@PresentationManager';
2
+ export type { TContentHint } from './types';
@@ -1,11 +1,14 @@
1
- import { TApiEvent, ApiManager } from './ApiManager';
2
- import { TCallEvent, CallManager } from './CallManager';
3
- import { TConnectionManagerEvent, ConnectionManager } from './ConnectionManager';
4
- import { TIncomingCallEvent, IncomingCallManager } from './IncomingCallManager';
5
- import { PresentationManager } from './PresentationManager';
6
- import { TContentHint, TOnAddedTransceiver } from './PresentationManager/types';
7
- import { TGetServerUrl, TJsSIP } from './types';
1
+ import { default as Events } from 'events-constructor';
2
+ import { ApiManager } from '../ApiManager';
3
+ import { TGetServerUrl, CallManager } from '../CallManager';
4
+ import { ConnectionManager } from '../ConnectionManager';
5
+ import { IncomingCallManager } from '../IncomingCallManager';
6
+ import { PresentationManager } from '../PresentationManager';
7
+ import { TContentHint, TOnAddedTransceiver } from '../PresentationManager/types';
8
+ import { TJsSIP } from '../types';
9
+ import { TEvent, EVENT_NAMES } from './eventNames';
8
10
  declare class SipConnector {
11
+ readonly events: Events<typeof EVENT_NAMES>;
9
12
  readonly connectionManager: ConnectionManager;
10
13
  readonly callManager: CallManager;
11
14
  readonly apiManager: ApiManager;
@@ -17,7 +20,7 @@ declare class SipConnector {
17
20
  get requestedConnection(): boolean;
18
21
  get isPendingConnect(): boolean;
19
22
  get isPendingInitUa(): boolean;
20
- get connectionState(): import('./ConnectionManager/ConnectionStateMachine').EState;
23
+ get connectionState(): import('../ConnectionManager/ConnectionStateMachine').EState;
21
24
  get isRegistered(): boolean;
22
25
  get isRegisterConfig(): boolean;
23
26
  get socket(): import('@krivega/jssip').WebSocketInterface | undefined;
@@ -27,6 +30,11 @@ declare class SipConnector {
27
30
  get isCallActive(): boolean;
28
31
  get remoteCallerData(): IncomingCallManager['remoteCallerData'];
29
32
  get isAvailableIncomingCall(): IncomingCallManager['isAvailableIncomingCall'];
33
+ on<T>(eventName: TEvent, handler: (data: T) => void): () => void;
34
+ once<T>(eventName: TEvent, handler: (data: T) => void): () => void;
35
+ onceRace<T>(eventNames: TEvent[], handler: (data: T, eventName: string) => void): () => void;
36
+ wait<T>(eventName: TEvent): Promise<T>;
37
+ off<T>(eventName: TEvent, handler: (data: T) => void): void;
30
38
  connect: ConnectionManager['connect'];
31
39
  set: ConnectionManager['set'];
32
40
  disconnect: () => Promise<void>;
@@ -36,13 +44,8 @@ declare class SipConnector {
36
44
  sendOptions: (target: Parameters<ConnectionManager["sendOptions"]>[0], body?: Parameters<ConnectionManager["sendOptions"]>[1], extraHeaders?: Parameters<ConnectionManager["sendOptions"]>[2]) => Promise<void>;
37
45
  ping: (body?: Parameters<ConnectionManager["ping"]>[0], extraHeaders?: Parameters<ConnectionManager["ping"]>[1]) => Promise<void>;
38
46
  checkTelephony: ConnectionManager['checkTelephony'];
39
- onConnection<T>(eventName: TConnectionManagerEvent, handler: (data: T) => void): () => void;
40
- onceConnection<T>(eventName: TConnectionManagerEvent, handler: (data: T) => void): () => void;
41
- onceRaceConnection<T>(eventNames: TConnectionManagerEvent[], handler: (data: T, eventName: string) => void): () => void;
42
- waitConnection<T>(eventName: TConnectionManagerEvent): Promise<T>;
43
- offConnection<T>(eventName: TConnectionManagerEvent, handler: (data: T) => void): void;
44
47
  isConfigured: () => boolean;
45
- getConnectionConfiguration: () => import('./ConnectionManager/ConfigurationManager').IConnectionConfiguration;
48
+ getConnectionConfiguration: () => import('../ConnectionManager/ConfigurationManager').IConnectionConfiguration;
46
49
  getSipServerUrl: TGetServerUrl;
47
50
  call: (params: Parameters<CallManager["startCall"]>[2]) => Promise<RTCPeerConnection>;
48
51
  hangUp: CallManager['endCall'];
@@ -52,16 +55,6 @@ declare class SipConnector {
52
55
  getCallConfiguration: CallManager['getCallConfiguration'];
53
56
  getRemoteStreams: CallManager['getRemoteStreams'];
54
57
  replaceMediaStream: CallManager['replaceMediaStream'];
55
- onCall<T>(eventName: TCallEvent, handler: (data: T) => void): () => void;
56
- onceCall<T>(eventName: TCallEvent, handler: (data: T) => void): () => void;
57
- onceRaceCall<T>(eventNames: TCallEvent[], handler: (data: T, eventName: string) => void): () => void;
58
- waitCall<T>(eventName: TCallEvent): Promise<T>;
59
- offIncomingCall<T>(eventName: TIncomingCallEvent, handler: (data: T) => void): void;
60
- onIncomingCall<T>(eventName: TIncomingCallEvent, handler: (data: T) => void): () => void;
61
- onceIncomingCall<T>(eventName: TIncomingCallEvent, handler: (data: T) => void): () => void;
62
- onceRaceIncomingCall<T>(eventNames: TIncomingCallEvent[], handler: (data: T, eventName: string) => void): () => void;
63
- waitIncomingCall<T>(eventName: TIncomingCallEvent): Promise<T>;
64
- offCall<T>(eventName: TCallEvent, handler: (data: T) => void): void;
65
58
  startPresentation(stream: MediaStream, options?: {
66
59
  isP2P?: boolean;
67
60
  isNeedReinvite?: boolean;
@@ -82,7 +75,7 @@ declare class SipConnector {
82
75
  sendEncodings?: RTCRtpEncodingParameters[];
83
76
  onAddedTransceiver?: TOnAddedTransceiver;
84
77
  }): Promise<MediaStream | undefined>;
85
- waitChannels(...args: Parameters<ApiManager['waitChannels']>): Promise<import('./ApiManager/types').TChannels>;
78
+ waitChannels(...args: Parameters<ApiManager['waitChannels']>): Promise<import('../ApiManager/types').TChannels>;
86
79
  waitSyncMediaState(...args: Parameters<ApiManager['waitSyncMediaState']>): Promise<{
87
80
  isSyncForced: boolean;
88
81
  }>;
@@ -98,10 +91,6 @@ declare class SipConnector {
98
91
  askPermissionToStartPresentationP2P(...args: Parameters<ApiManager['askPermissionToStartPresentationP2P']>): Promise<void>;
99
92
  askPermissionToStartPresentation(...args: Parameters<ApiManager['askPermissionToStartPresentation']>): Promise<void>;
100
93
  askPermissionToEnableCam(...args: Parameters<ApiManager['askPermissionToEnableCam']>): Promise<void>;
101
- onApi<T>(eventName: TApiEvent, handler: (data: T) => void): () => void;
102
- onceApi<T>(eventName: TApiEvent, handler: (data: T) => void): () => void;
103
- onceRaceApi<T>(eventNames: TApiEvent[], handler: (data: T, eventName: string) => void): () => void;
104
- waitApi<T>(eventName: TApiEvent): Promise<T>;
105
- offApi<T>(eventName: TApiEvent, handler: (data: T) => void): void;
94
+ private subscribe;
106
95
  }
107
96
  export default SipConnector;
@@ -0,0 +1,4 @@
1
+ import { default as Events } from 'events-constructor';
2
+ export declare const EVENT_NAMES: readonly ("connection:connecting" | "connection:connected" | "connection:disconnected" | "connection:newRTCSession" | "connection:registered" | "connection:unregistered" | "connection:registrationFailed" | "connection:newMessage" | "connection:sipEvent" | "call:peerconnection" | "call:connecting" | "call:sending" | "call:progress" | "call:accepted" | "call:confirmed" | "call:ended" | "call:failed" | "call:newDTMF" | "call:newInfo" | "call:reinvite" | "call:update" | "call:refer" | "call:replaces" | "call:sdp" | "call:icecandidate" | "call:getusermediafailed" | "call:peerconnection:createofferfailed" | "call:peerconnection:createanswerfailed" | "call:peerconnection:setlocaldescriptionfailed" | "call:peerconnection:setremotedescriptionfailed" | "call:presentation:start" | "call:presentation:started" | "call:presentation:end" | "call:presentation:ended" | "call:presentation:failed" | "call:peerconnection:confirmed" | "call:peerconnection:ontrack" | "call:ended:fromserver" | "api:newDTMF" | "api:channels:notify" | "api:participant:added-to-list-moderators" | "api:participant:removed-from-list-moderators" | "api:participant:move-request-to-stream" | "api:participant:move-request-to-spectators" | "api:participant:move-request-to-participants" | "api:participation:accepting-word-request" | "api:participation:cancelling-word-request" | "api:webcast:started" | "api:webcast:stopped" | "api:account:changed" | "api:account:deleted" | "api:conference:participant-token-issued" | "api:channels" | "api:enterRoom" | "api:shareState" | "api:main-cam-control" | "api:useLicense" | "api:admin-start-main-cam" | "api:admin-stop-main-cam" | "api:admin-start-mic" | "api:admin-stop-mic" | "api:admin-force-sync-media-state" | "api:availableSecondRemoteStream" | "api:notAvailableSecondRemoteStream" | "api:mustStopPresentation" | "incoming-call:incomingCall" | "incoming-call:declinedIncomingCall" | "incoming-call:terminatedIncomingCall" | "incoming-call:failedIncomingCall" | "presentation:presentation:start" | "presentation:presentation:started" | "presentation:presentation:end" | "presentation:presentation:ended" | "presentation:presentation:failed")[];
3
+ export type TEvent = (typeof EVENT_NAMES)[number];
4
+ export type TEvents = Events<typeof EVENT_NAMES>;
@@ -0,0 +1,2 @@
1
+ export { default as SipConnector } from './@SipConnector';
2
+ export type { TEvent, TEvents } from './eventNames';
@@ -1,22 +1,14 @@
1
1
  import { UA } from '@krivega/jssip';
2
- import { default as SipConnector } from '../SipConnector';
3
- import { EUseLicense, TContentHint, TSimulcastEncoding } from '../types';
2
+ import { EUseLicense } from '../ApiManager';
3
+ import { TContentHint } from '../PresentationManager';
4
+ import { SipConnector } from '../SipConnector';
5
+ import { TSimulcastEncoding } from '../types';
4
6
  interface IProxyMethods {
5
- on: SipConnector['onConnection'];
6
- once: SipConnector['onceConnection'];
7
- onceRace: SipConnector['onceRaceConnection'];
8
- wait: SipConnector['waitConnection'];
9
- off: SipConnector['offConnection'];
10
- onCall: SipConnector['onCall'];
11
- onceCall: SipConnector['onceCall'];
12
- onceRaceCall: SipConnector['onceRaceCall'];
13
- waitCall: SipConnector['waitCall'];
14
- offCall: SipConnector['offCall'];
15
- onIncomingCall: SipConnector['onIncomingCall'];
16
- onceIncomingCall: SipConnector['onceIncomingCall'];
17
- onceRaceIncomingCall: SipConnector['onceRaceIncomingCall'];
18
- waitIncomingCall: SipConnector['waitIncomingCall'];
19
- offIncomingCall: SipConnector['offIncomingCall'];
7
+ on: SipConnector['on'];
8
+ once: SipConnector['once'];
9
+ onceRace: SipConnector['onceRace'];
10
+ wait: SipConnector['wait'];
11
+ off: SipConnector['off'];
20
12
  sendDTMF: SipConnector['sendDTMF'];
21
13
  hangUp: SipConnector['hangUp'];
22
14
  declineToIncomingCall: SipConnector['declineToIncomingCall'];
@@ -34,16 +26,6 @@ declare class SipConnectorFacade implements IProxyMethods {
34
26
  onceRace: IProxyMethods['onceRace'];
35
27
  wait: IProxyMethods['wait'];
36
28
  off: IProxyMethods['off'];
37
- onCall: IProxyMethods['onCall'];
38
- onceCall: IProxyMethods['onceCall'];
39
- onceRaceCall: IProxyMethods['onceRaceCall'];
40
- waitCall: IProxyMethods['waitCall'];
41
- offCall: IProxyMethods['offCall'];
42
- onIncomingCall: IProxyMethods['onIncomingCall'];
43
- onceIncomingCall: IProxyMethods['onceIncomingCall'];
44
- onceRaceIncomingCall: IProxyMethods['onceRaceIncomingCall'];
45
- waitIncomingCall: IProxyMethods['waitIncomingCall'];
46
- offIncomingCall: IProxyMethods['offIncomingCall'];
47
29
  sendDTMF: IProxyMethods['sendDTMF'];
48
30
  hangUp: IProxyMethods['hangUp'];
49
31
  declineToIncomingCall: IProxyMethods['declineToIncomingCall'];
@@ -150,7 +132,7 @@ declare class SipConnectorFacade implements IProxyMethods {
150
132
  sendEncodings?: RTCRtpEncodingParameters[];
151
133
  preferredMimeTypesVideoCodecs?: string[];
152
134
  excludeMimeTypesVideoCodecs?: string[];
153
- callLimit: number;
135
+ callLimit?: number;
154
136
  }) => Promise<MediaStream | undefined>;
155
137
  stopShareSipConnector: ({ isP2P }?: {
156
138
  isP2P?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { AnswerOptions, ExtraHeaders, HoldOptions, MediaStreamTypes, NameAddrHeader, OnHoldResult, RTCPeerConnectionDeprecated, RTCSession, ReferOptions, RenegotiateOptions, SessionDirection, SessionStatus, TerminateOptions, URI, C as constants } from '@krivega/jssip';
2
2
  import { default as Events } from 'events-constructor';
3
- import { TEventSession, SESSION_EVENT_NAMES } from '../eventNames';
3
+ import { TEventSession, SESSION_EVENT_NAMES } from './eventNames';
4
4
  export type TEventHandlers = Record<string, (data: unknown) => void>;
5
5
  declare class BaseSession implements RTCSession {
6
6
  originator: string;
@@ -2,7 +2,7 @@ export declare const UA_SYNTHETICS_EVENT_NAMES: readonly ["incomingCall", "decli
2
2
  export declare const UA_JSSIP_EVENT_NAMES: readonly ["connecting", "connected", "disconnected", "newRTCSession", "registered", "unregistered", "registrationFailed", "newMessage", "sipEvent"];
3
3
  export declare const SESSION_SYNTHETICS_EVENT_NAMES: readonly ["availableSecondRemoteStream", "notAvailableSecondRemoteStream", "mustStopPresentation", "shareState", "enterRoom", "useLicense", "peerconnection:confirmed", "peerconnection:ontrack", "channels", "ended:fromserver", "main-cam-control", "admin-start-main-cam", "admin-stop-main-cam", "admin-stop-mic", "admin-start-mic", "admin-force-sync-media-state", "participant:move-request-to-spectators", "participant:move-request-to-participants"];
4
4
  export declare const SESSION_JSSIP_EVENT_NAMES: readonly ["ended", "connecting", "sending", "reinvite", "replaces", "refer", "progress", "accepted", "confirmed", "peerconnection", "failed", "muted", "unmuted", "newDTMF", "newInfo", "hold", "unhold", "update", "sdp", "icecandidate", "getusermediafailed", "peerconnection:createofferfailed", "peerconnection:createanswerfailed", "peerconnection:setlocaldescriptionfailed", "peerconnection:setremotedescriptionfailed", "presentation:start", "presentation:started", "presentation:end", "presentation:ended", "presentation:failed"];
5
- export declare const UA_EVENT_NAMES: ("incomingCall" | "declinedIncomingCall" | "failedIncomingCall" | "terminatedIncomingCall" | "connecting" | "connected" | "disconnected" | "newRTCSession" | "registered" | "unregistered" | "registrationFailed" | "newMessage" | "sipEvent" | "channels:notify" | "participant:added-to-list-moderators" | "participant:removed-from-list-moderators" | "participant:move-request-to-stream" | "participation:accepting-word-request" | "participation:cancelling-word-request" | "webcast:started" | "webcast:stopped" | "account:changed" | "account:deleted" | "conference:participant-token-issued")[];
5
+ export declare const UA_EVENT_NAMES: ("connecting" | "connected" | "disconnected" | "newRTCSession" | "registered" | "unregistered" | "registrationFailed" | "newMessage" | "sipEvent" | "channels:notify" | "participant:added-to-list-moderators" | "participant:removed-from-list-moderators" | "participant:move-request-to-stream" | "participation:accepting-word-request" | "participation:cancelling-word-request" | "webcast:started" | "webcast:stopped" | "account:changed" | "account:deleted" | "conference:participant-token-issued" | "incomingCall" | "declinedIncomingCall" | "terminatedIncomingCall" | "failedIncomingCall")[];
6
6
  export declare const SESSION_EVENT_NAMES: readonly ["ended", "connecting", "sending", "reinvite", "replaces", "refer", "progress", "accepted", "confirmed", "peerconnection", "failed", "muted", "unmuted", "newDTMF", "newInfo", "hold", "unhold", "update", "sdp", "icecandidate", "getusermediafailed", "peerconnection:createofferfailed", "peerconnection:createanswerfailed", "peerconnection:setlocaldescriptionfailed", "peerconnection:setremotedescriptionfailed", "presentation:start", "presentation:started", "presentation:end", "presentation:ended", "presentation:failed", "availableSecondRemoteStream", "notAvailableSecondRemoteStream", "mustStopPresentation", "shareState", "enterRoom", "useLicense", "peerconnection:confirmed", "peerconnection:ontrack", "channels", "ended:fromserver", "main-cam-control", "admin-start-main-cam", "admin-stop-main-cam", "admin-stop-mic", "admin-start-mic", "admin-force-sync-media-state", "participant:move-request-to-spectators", "participant:move-request-to-participants"];
7
7
  export type TEventUA = (typeof UA_EVENT_NAMES)[number];
8
8
  export type TEventSession = (typeof SESSION_EVENT_NAMES)[number];
package/dist/doMock.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./SipConnector-CwI8aFEA.cjs"),W=require("@krivega/jssip/lib/NameAddrHeader"),k=require("@krivega/jssip/lib/URI"),D=require("node:events"),F=require("@krivega/jssip/lib/SIPMessage"),d=require("@krivega/jssip"),R=require("webrtc-mock"),N=require("events-constructor");class I extends F.IncomingRequest{headers;constructor(e){super(),this.headers=new Headers(e)}getHeader(e){return this.headers.get(e)??""}}class L{originator;connection;events;remote_identity;mutedOptions={audio:!1,video:!1};constructor({originator:e="local",eventHandlers:t,remoteIdentity:r}){this.originator=e,this.events=new N(h.SESSION_EVENT_NAMES),this.initEvents(t),this.remote_identity=r}get contact(){throw new Error("Method not implemented.")}get direction(){throw new Error("Method not implemented.")}get local_identity(){throw new Error("Method not implemented.")}get start_time(){throw new Error("Method not implemented.")}get end_time(){throw new Error("Method not implemented.")}get status(){throw new Error("Method not implemented.")}get C(){throw new Error("Method not implemented.")}get causes(){throw new Error("Method not implemented.")}get id(){throw new Error("Method not implemented.")}get data(){throw new Error("Method not implemented.")}set data(e){throw new Error("Method not implemented.")}isInProgress(){throw new Error("Method not implemented.")}isEnded(){throw new Error("Method not implemented.")}isReadyToReOffer(){throw new Error("Method not implemented.")}answer(e){throw new Error("Method not implemented.")}terminate(e){throw new Error("Method not implemented.")}async sendInfo(e,t,r){throw new Error("Method not implemented.")}hold(e,t){throw new Error("Method not implemented.")}unhold(e,t){throw new Error("Method not implemented.")}async renegotiate(e,t){throw new Error("Method not implemented.")}isOnHold(){throw new Error("Method not implemented.")}mute(e){throw new Error("Method not implemented.")}unmute(e){throw new Error("Method not implemented.")}isMuted(){throw new Error("Method not implemented.")}refer(e,t){throw new Error("Method not implemented.")}resetLocalMedia(){throw new Error("Method not implemented.")}async replaceMediaStream(e,t){throw new Error("Method not implemented.")}addListener(e,t){throw new Error("Method not implemented.")}once(e,t){throw new Error("Method not implemented.")}removeListener(e,t){throw new Error("Method not implemented.")}off(e,t){return this.events.off(e,t),this}removeAllListeners(e){return console.warn("Method not implemented. Event:",e),this}setMaxListeners(e){throw new Error("Method not implemented.")}getMaxListeners(){throw new Error("Method not implemented.")}listeners(e){throw new Error("Method not implemented.")}rawListeners(e){throw new Error("Method not implemented.")}emit(e,...t){throw new Error("Method not implemented.")}listenerCount(e){throw new Error("Method not implemented.")}prependListener(e,t){throw new Error("Method not implemented.")}prependOnceListener(e,t){throw new Error("Method not implemented.")}eventNames(){throw new Error("Method not implemented.")}initEvents(e){e&&Object.entries(e).forEach(([t,r])=>this.on(t,r))}on(e,t){return this.events.on(e,t),this}trigger(e,t){this.events.trigger(e,t)}sendDTMF(){this.trigger("newDTMF",{originator:this.originator})}async startPresentation(e){return this.trigger("presentation:start",e),this.trigger("presentation:started",e),e}async stopPresentation(e){return this.trigger("presentation:end",e),this.trigger("presentation:ended",e),e}isEstablished(){return!0}}class V{dtmf=null;track=null;transport=null;transform=null;parameters={encodings:[{}],transactionId:"0",codecs:[],headerExtensions:[],rtcp:{}};parametersGets;constructor({track:e}={}){this.track=e??null}async getStats(){throw new Error("Method not implemented.")}async replaceTrack(e){this.track=e??null}async setParameters(e){if(e!==this.parametersGets)throw new Error("Failed to execute 'setParameters' on 'RTCRtpSender': Read-only field modified in setParameters().");const{transactionId:t}=this.parameters;this.parameters={...this.parameters,...e,transactionId:`${Number(t)+1}`}}getParameters(){return this.parametersGets={...this.parameters},this.parametersGets}setStreams(){throw new Error("Method not implemented.")}}class x{senders=[];receivers=[];canTrickleIceCandidates;connectionState;currentLocalDescription;currentRemoteDescription;iceConnectionState;iceGatheringState;idpErrorInfo;idpLoginUrl;localDescription;onconnectionstatechange;ondatachannel;onicecandidate;onicecandidateerror=null;oniceconnectionstatechange;onicegatheringstatechange;onnegotiationneeded;onsignalingstatechange;ontrack;peerIdentity=void 0;pendingLocalDescription;pendingRemoteDescription;remoteDescription;sctp=null;signalingState;constructor(e,t){this.receivers=t.map(r=>({track:r}))}getRemoteStreams(){throw new Error("Method not implemented.")}async addIceCandidate(e){throw new Error("Method not implemented.")}addTransceiver(e,t){throw new Error("Method not implemented.")}close(){throw new Error("Method not implemented.")}restartIce(){throw new Error("Method not implemented.")}async createAnswer(e,t){throw new Error("Method not implemented.")}createDataChannel(e,t){throw new Error("Method not implemented.")}async createOffer(e,t,r){throw new Error("Method not implemented.")}getConfiguration(){throw new Error("Method not implemented.")}async getIdentityAssertion(){throw new Error("Method not implemented.")}async getStats(e){throw new Error("Method not implemented.")}getTransceivers(){throw new Error("Method not implemented.")}removeTrack(e){throw new Error("Method not implemented.")}setConfiguration(e){throw new Error("Method not implemented.")}async setLocalDescription(e){throw new Error("Method not implemented.")}async setRemoteDescription(e){throw new Error("Method not implemented.")}addEventListener(e,t,r){console.warn("Method not implemented. Type:",e)}removeEventListener(e,t,r){console.warn("Method not implemented. Type:",e)}dispatchEvent(e){throw new Error("Method not implemented.")}getReceivers=()=>this.receivers;getSenders=()=>this.senders;addTrack=e=>{const t=new V({track:e});return this.senders.push(t),t}}function z(n){const e=n.match(/(purgatory)|[\d.]+/g);if(!e)throw new Error("wrong sip url");return e[0]}const w=400,P="777",q=n=>n.getVideoTracks().length>0;class i extends L{static presentationError;static startPresentationError;static countStartPresentationError=Number.POSITIVE_INFINITY;static countStartsPresentation=0;url;status_code;answer=jest.fn(({mediaStream:e})=>{if(this.originator!=="remote")throw new Error("answer available only for remote sessions");this.initPeerconnection(e),setTimeout(()=>{this.trigger("connecting"),setTimeout(()=>{this.trigger("accepted")},100),setTimeout(()=>{this.trigger("confirmed")},200)},w)});replaceMediaStream=jest.fn(async e=>{});isEndedInner=!1;constructor({url:e="",mediaStream:t,eventHandlers:r,originator:s,remoteIdentity:a=new d.NameAddrHeader(new d.URI("sip","caller1","test1.com",5060),"Test Caller 1")}){super({originator:s,eventHandlers:r,remoteIdentity:a}),this.url=e,this.initPeerconnection(t)}static setPresentationError(e){this.presentationError=e}static resetPresentationError(){this.presentationError=void 0}static setStartPresentationError(e,{count:t=Number.POSITIVE_INFINITY}={}){this.startPresentationError=e,this.countStartPresentationError=t}static resetStartPresentationError(){this.startPresentationError=void 0,this.countStartPresentationError=Number.POSITIVE_INFINITY,this.countStartsPresentation=0}startPresentation=async e=>{if(i.countStartsPresentation+=1,i.presentationError)throw this.trigger("presentation:start",e),this.trigger("presentation:failed",e),i.presentationError;if(i.startPresentationError&&i.countStartsPresentation<i.countStartPresentationError)throw this.trigger("presentation:start",e),this.trigger("presentation:failed",e),i.startPresentationError;return super.startPresentation(e)};stopPresentation=async e=>{if(i.presentationError)throw this.trigger("presentation:end",e),this.trigger("presentation:failed",e),i.presentationError;return super.stopPresentation(e)};initPeerconnection(e){return e?(this.createPeerconnection(e),!0):!1}createPeerconnection(e){const t=R.createAudioMediaStreamTrackMock();t.id="mainaudio1";const r=[t];if(q(e)){const a=R.createVideoMediaStreamTrackMock();a.id="mainvideo1",r.push(a)}this.connection=new x(void 0,r),this.addStream(e),setTimeout(()=>{this.trigger("peerconnection",{peerconnection:this.connection})},w)}connect(e){const t=z(e);setTimeout(()=>{this.url.includes(P)?this.trigger("failed",{originator:"remote",message:"IncomingResponse",cause:h.REJECTED}):(this.trigger("connecting"),setTimeout(()=>{this.newInfo({originator:h.Originator$1.REMOTE,request:{getHeader:r=>r==="content-type"?"application/vinteo.webrtc.roomname":r==="x-webrtc-enter-room"?t:r==="x-webrtc-participant-name"?"Test Caller 1":""}})},100),setTimeout(()=>{this.trigger("accepted")},200),setTimeout(()=>{this.trigger("confirmed")},300))},w)}terminate({status_code:e,cause:t}={}){return this.status_code=e,this.trigger("ended",{status_code:e,cause:t,originator:"local"}),this.isEndedInner=!1,this}async terminateAsync({status_code:e,cause:t}={}){this.terminate({status_code:e,cause:t})}terminateRemote({status_code:e}={}){return this.status_code=e,this.trigger("ended",{status_code:e,originator:"remote"}),this}addStream(e,t="getTracks"){e[t]().forEach(r=>this.connection.addTrack(r))}forEachSenders(e){const t=this.connection.getSenders();for(const r of t)e(r);return t}toggleMuteAudio(e){this.forEachSenders(({track:t})=>{t&&t.kind==="audio"&&(t.enabled=!e)})}toggleMuteVideo(e){this.forEachSenders(({track:t})=>{t&&t.kind==="video"&&(t.enabled=!e)})}mute(e){e.audio&&(this.mutedOptions.audio=!0,this.toggleMuteAudio(this.mutedOptions.audio)),e.video&&(this.mutedOptions.video=!0,this.toggleMuteVideo(this.mutedOptions.video)),this.onmute(e)}unmute(e){e.audio&&(this.mutedOptions.audio=!1),e.video&&(this.mutedOptions.video=!1),this.trigger("unmuted",e)}isMuted(){return this.mutedOptions}onmute({audio:e,video:t}){this.trigger("muted",{audio:e,video:t})}async sendInfo(){}isEnded(){return this.isEndedInner}newInfo(e){this.trigger("newInfo",e)}}class H{extraHeaders=[];setExtraHeaders(e){this.extraHeaders=e}setExtraContactParams(){}}const c="PASSWORD_CORRECT",S="PASSWORD_CORRECT_2",O="NAME_INCORRECT",m=400,f={url:"wss://sipServerUrl/webrtc/wss/",sip_uri:"sip:sipServerUrl;transport=ws",via_transport:"WSS"},C={status_code:200,reason_phrase:"OK"},y={status_code:401,reason_phrase:"Unauthorized"};class o{static isAvailableTelephony=!0;static startError;static countStartError=Number.POSITIVE_INFINITY;static countStarts=0;events;registratorInner;call=jest.fn((e,t)=>{const{mediaStream:r,eventHandlers:s}=t;return this.session=new i({url:e,mediaStream:r,eventHandlers:s,originator:"local"}),this.session.connect(e),this.session});sendOptions=jest.fn((e,t,r)=>{console.log("sendOptions",e,t,r)});start=jest.fn(()=>{if(o.countStarts+=1,o.startError&&o.countStarts<o.countStartError){this.trigger("disconnected",o.startError);return}this.register()});stop=jest.fn(()=>{this.startedTimeout&&clearTimeout(this.startedTimeout),this.stopedTimeout&&clearTimeout(this.stopedTimeout),this.unregister(),this.isStarted()?this.stopedTimeout=setTimeout(()=>{this.trigger("disconnected",{error:!0,socket:f})},m):this.trigger("disconnected",{error:!0,socket:f})});removeAllListeners=jest.fn(()=>(this.events.removeEventHandlers(),this));once=jest.fn((e,t)=>(this.events.once(e,t),this));startedTimeout;stopedTimeout;session;isRegisteredInner;isConnectedInner;configuration;constructor(e){this.events=new N(h.UA_JSSIP_EVENT_NAMES);const[t,r]=e.uri.split(":"),[s,a]=r.split("@"),E={...e,uri:new d.URI(t,s,a)};this.configuration=E,this.registratorInner=new H}static setStartError(e,{count:t=Number.POSITIVE_INFINITY}={}){o.startError=e,o.countStartError=t}static resetStartError(){o.startError=void 0,o.countStartError=Number.POSITIVE_INFINITY,o.countStarts=0}static setAvailableTelephony(){o.isAvailableTelephony=!0}static setNotAvailableTelephony(){o.isAvailableTelephony=!1}static reset(){o.resetStartError(),o.setAvailableTelephony()}on(e,t){return this.events.on(e,t),this}off(e,t){return this.events.off(e,t),this}trigger(e,t){this.events.trigger(e,t)}terminateSessions(){this.session?.terminate()}set(e,t){return this.configuration[e]=t,!0}register(){this.startedTimeout&&clearTimeout(this.startedTimeout);const{password:e,register:t,uri:r}=this.configuration;t===!0&&r.user.includes(O)?(this.isRegisteredInner=!1,this.isConnectedInner=!1,this.startedTimeout=setTimeout(()=>{this.trigger("registrationFailed",{response:y,cause:d.C.causes.REJECTED})},m)):!this.isRegistered()&&t===!0&&(e===c||e===S)?(this.isRegisteredInner=!0,this.startedTimeout=setTimeout(()=>{this.trigger("registered",{response:C})},m)):t===!0&&e!==c&&e!==S&&(this.isRegisteredInner=!1,this.isConnectedInner=!1,this.startedTimeout=setTimeout(()=>{this.trigger("registrationFailed",{response:y,cause:d.C.causes.REJECTED})},m)),o.isAvailableTelephony?(this.trigger("connected",{socket:f}),this.isConnectedInner=!0):this.stop()}unregister(){this.isRegisteredInner=!1,this.isConnectedInner=!1,this.trigger("unregistered",{response:C})}isRegistered(){return this.isRegisteredInner===!0}isConnected(){return this.isConnectedInner===!0}isStarted(){return this.configuration.register===!0&&this.isRegisteredInner===!0||this.configuration.register!==!0&&this.isConnectedInner===!0}newSipEvent(e){this.trigger("sipEvent",e)}registrator(){return this.registratorInner}}class j{url;constructor(e){this.url=e}}class U extends D.EventEmitter{contentType;body;constructor(e,t){super(),this.contentType=e,this.body=t}}const _="remote",Y=(n,e)=>{const t=new I(e),r={originator:_,request:t,info:new U("","")};n.newInfo(r)},B=(n,e)=>{const r={event:"sipEvent",request:new I(e)};n.newSipEvent(r)},J=(n,{incomingNumber:e="1234",displayName:t,host:r})=>{const s=new i({originator:_,eventHandlers:{}}),a=new k("sip",e,r);s.remote_identity=new W(a,t);const E=new I([]);n.trigger("newRTCSession",{originator:_,session:s,request:E})},$=(n,e)=>{e?n.trigger("failed",e):n.trigger("failed",n)},M={triggerNewInfo:Y,triggerNewSipEvent:B,triggerIncomingSession:J,triggerFailIncomingSession:$,WebSocketInterface:j,UA:o,C:{INVITE:"INVITE"}},l="user",u="displayName",p="SIP_SERVER_URL",T="SIP_WEB_SOCKET_SERVER_URL",G=new M.WebSocketInterface(T),v={userAgent:"Chrome",sipServerUrl:p,sipWebSocketServerURL:T},K={...v},A={...v,user:l,password:c,register:!0},X={...A,displayName:u},Q={...v,displayName:u,register:!1},g={session_timers:!1,sockets:[G],user_agent:"Chrome",sdpSemantics:"unified-plan",register_expires:300,connection_recovery_max_interval:6,connection_recovery_min_interval:2},Z={...g,password:c,uri:new d.URI("sip",l,p),display_name:"",register:!0},ee={...g,password:c,uri:new d.URI("sip",l,p),display_name:u,register:!0},te={...g,display_name:u,register:!1},re={...g,display_name:"",register:!1},b="10.10.10.10",ne=[`X-Vinteo-Remote: ${b}`],oe=()=>new h.SipConnector({JsSIP:M});exports.FAILED_CONFERENCE_NUMBER=P;exports.JsSIP=M;exports.NAME_INCORRECT=O;exports.PASSWORD_CORRECT=c;exports.PASSWORD_CORRECT_2=S;exports.SIP_SERVER_URL=p;exports.SIP_WEB_SOCKET_SERVER_URL=T;exports.dataForConnectionWithAuthorization=A;exports.dataForConnectionWithAuthorizationWithDisplayName=X;exports.dataForConnectionWithoutAuthorization=Q;exports.dataForConnectionWithoutAuthorizationWithoutDisplayName=K;exports.displayName=u;exports.doMockSipConnector=oe;exports.extraHeadersRemoteAddress=ne;exports.remoteAddress=b;exports.uaConfigurationWithAuthorization=Z;exports.uaConfigurationWithAuthorizationWithDisplayName=ee;exports.uaConfigurationWithoutAuthorization=te;exports.uaConfigurationWithoutAuthorizationWithoutDisplayName=re;exports.user=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("./@SipConnector-Bkm1XX-8.cjs"),W=require("@krivega/jssip/lib/NameAddrHeader"),b=require("@krivega/jssip/lib/URI"),V=require("node:events"),k=require("@krivega/jssip/lib/SIPMessage"),c=require("@krivega/jssip"),R=require("webrtc-mock"),O=require("events-constructor");class S extends k.IncomingRequest{headers;constructor(e){super(),this.headers=new Headers(e)}getHeader(e){return this.headers.get(e)??""}}const U="incomingCall",H="declinedIncomingCall",q="failedIncomingCall",G="terminatedIncomingCall",P="connecting",x="connected",z="disconnected",j="newRTCSession",Y="registered",B="unregistered",K="registrationFailed",J="newMessage",Q="sipEvent",$="availableSecondRemoteStream",X="notAvailableSecondRemoteStream",Z="mustStopPresentation",ee="shareState",te="enterRoom",re="useLicense",ne="peerconnection:confirmed",oe="peerconnection:ontrack",ie="channels",se="channels:notify",ae="ended:fromserver",ce="main-cam-control",de="admin-stop-main-cam",Ee="admin-start-main-cam",he="admin-stop-mic",ue="admin-start-mic",me="admin-force-sync-media-state",le="participant:added-to-list-moderators",pe="participant:removed-from-list-moderators",ge="participant:move-request-to-stream",_e="participant:move-request-to-spectators",Te="participant:move-request-to-participants",Ie="participation:accepting-word-request",Se="participation:cancelling-word-request",Ne="webcast:started",we="webcast:stopped",Ce="account:changed",Re="account:deleted",fe="conference:participant-token-issued",Ae="ended",Me="sending",Oe="reinvite",Pe="replaces",De="refer",ve="progress",ye="accepted",Le="confirmed",Fe="peerconnection",We="failed",be="muted",Ve="unmuted",ke="newDTMF",Ue="newInfo",He="hold",qe="unhold",Ge="update",xe="sdp",ze="icecandidate",je="getusermediafailed",Ye="peerconnection:createofferfailed",Be="peerconnection:createanswerfailed",Ke="peerconnection:setlocaldescriptionfailed",Je="peerconnection:setremotedescriptionfailed",Qe="presentation:start",$e="presentation:started",Xe="presentation:end",Ze="presentation:ended",et="presentation:failed",tt=[U,H,G,q,Ie,Se,ge,se,fe,Ce,Re,Ne,we,le,pe],D=[P,x,z,j,Y,B,K,J,Q],rt=[$,X,Z,ee,te,re,ne,oe,ie,ae,ce,Ee,de,he,ue,me,_e,Te],nt=[Ae,P,Me,Oe,Pe,De,ve,ye,Le,Fe,We,be,Ve,ke,Ue,He,qe,Ge,xe,ze,je,Ye,Be,Ke,Je,Qe,$e,Xe,Ze,et];[...D,...tt];const ot=[...nt,...rt];class it{originator;connection;events;remote_identity;mutedOptions={audio:!1,video:!1};constructor({originator:e="local",eventHandlers:t,remoteIdentity:r}){this.originator=e,this.events=new O(ot),this.initEvents(t),this.remote_identity=r}get contact(){throw new Error("Method not implemented.")}get direction(){throw new Error("Method not implemented.")}get local_identity(){throw new Error("Method not implemented.")}get start_time(){throw new Error("Method not implemented.")}get end_time(){throw new Error("Method not implemented.")}get status(){throw new Error("Method not implemented.")}get C(){throw new Error("Method not implemented.")}get causes(){throw new Error("Method not implemented.")}get id(){throw new Error("Method not implemented.")}get data(){throw new Error("Method not implemented.")}set data(e){throw new Error("Method not implemented.")}isInProgress(){throw new Error("Method not implemented.")}isEnded(){throw new Error("Method not implemented.")}isReadyToReOffer(){throw new Error("Method not implemented.")}answer(e){throw new Error("Method not implemented.")}terminate(e){throw new Error("Method not implemented.")}async sendInfo(e,t,r){throw new Error("Method not implemented.")}hold(e,t){throw new Error("Method not implemented.")}unhold(e,t){throw new Error("Method not implemented.")}async renegotiate(e,t){throw new Error("Method not implemented.")}isOnHold(){throw new Error("Method not implemented.")}mute(e){throw new Error("Method not implemented.")}unmute(e){throw new Error("Method not implemented.")}isMuted(){throw new Error("Method not implemented.")}refer(e,t){throw new Error("Method not implemented.")}resetLocalMedia(){throw new Error("Method not implemented.")}async replaceMediaStream(e,t){throw new Error("Method not implemented.")}addListener(e,t){throw new Error("Method not implemented.")}once(e,t){throw new Error("Method not implemented.")}removeListener(e,t){throw new Error("Method not implemented.")}off(e,t){return this.events.off(e,t),this}removeAllListeners(e){return console.warn("Method not implemented. Event:",e),this}setMaxListeners(e){throw new Error("Method not implemented.")}getMaxListeners(){throw new Error("Method not implemented.")}listeners(e){throw new Error("Method not implemented.")}rawListeners(e){throw new Error("Method not implemented.")}emit(e,...t){throw new Error("Method not implemented.")}listenerCount(e){throw new Error("Method not implemented.")}prependListener(e,t){throw new Error("Method not implemented.")}prependOnceListener(e,t){throw new Error("Method not implemented.")}eventNames(){throw new Error("Method not implemented.")}initEvents(e){e&&Object.entries(e).forEach(([t,r])=>this.on(t,r))}on(e,t){return this.events.on(e,t),this}trigger(e,t){this.events.trigger(e,t)}sendDTMF(){this.trigger("newDTMF",{originator:this.originator})}async startPresentation(e){return this.trigger("presentation:start",e),this.trigger("presentation:started",e),e}async stopPresentation(e){return this.trigger("presentation:end",e),this.trigger("presentation:ended",e),e}isEstablished(){return!0}}class st{dtmf=null;track=null;transport=null;transform=null;parameters={encodings:[{}],transactionId:"0",codecs:[],headerExtensions:[],rtcp:{}};parametersGets;constructor({track:e}={}){this.track=e??null}async getStats(){throw new Error("Method not implemented.")}async replaceTrack(e){this.track=e??null}async setParameters(e){if(e!==this.parametersGets)throw new Error("Failed to execute 'setParameters' on 'RTCRtpSender': Read-only field modified in setParameters().");const{transactionId:t}=this.parameters;this.parameters={...this.parameters,...e,transactionId:`${Number(t)+1}`}}getParameters(){return this.parametersGets={...this.parameters},this.parametersGets}setStreams(){throw new Error("Method not implemented.")}}class at{senders=[];receivers=[];canTrickleIceCandidates;connectionState;currentLocalDescription;currentRemoteDescription;iceConnectionState;iceGatheringState;idpErrorInfo;idpLoginUrl;localDescription;onconnectionstatechange;ondatachannel;onicecandidate;onicecandidateerror=null;oniceconnectionstatechange;onicegatheringstatechange;onnegotiationneeded;onsignalingstatechange;ontrack;peerIdentity=void 0;pendingLocalDescription;pendingRemoteDescription;remoteDescription;sctp=null;signalingState;constructor(e,t){this.receivers=t.map(r=>({track:r}))}getRemoteStreams(){throw new Error("Method not implemented.")}async addIceCandidate(e){throw new Error("Method not implemented.")}addTransceiver(e,t){throw new Error("Method not implemented.")}close(){throw new Error("Method not implemented.")}restartIce(){throw new Error("Method not implemented.")}async createAnswer(e,t){throw new Error("Method not implemented.")}createDataChannel(e,t){throw new Error("Method not implemented.")}async createOffer(e,t,r){throw new Error("Method not implemented.")}getConfiguration(){throw new Error("Method not implemented.")}async getIdentityAssertion(){throw new Error("Method not implemented.")}async getStats(e){throw new Error("Method not implemented.")}getTransceivers(){throw new Error("Method not implemented.")}removeTrack(e){throw new Error("Method not implemented.")}setConfiguration(e){throw new Error("Method not implemented.")}async setLocalDescription(e){throw new Error("Method not implemented.")}async setRemoteDescription(e){throw new Error("Method not implemented.")}addEventListener(e,t,r){console.warn("Method not implemented. Type:",e)}removeEventListener(e,t,r){console.warn("Method not implemented. Type:",e)}dispatchEvent(e){throw new Error("Method not implemented.")}getReceivers=()=>this.receivers;getSenders=()=>this.senders;addTrack=e=>{const t=new st({track:e});return this.senders.push(t),t}}function ct(n){const e=n.match(/(purgatory)|[\d.]+/g);if(!e)throw new Error("wrong sip url");return e[0]}const g=400,v="777",dt=n=>n.getVideoTracks().length>0;class i extends it{static presentationError;static startPresentationError;static countStartPresentationError=Number.POSITIVE_INFINITY;static countStartsPresentation=0;url;status_code;answer=jest.fn(({mediaStream:e})=>{if(this.originator!=="remote")throw new Error("answer available only for remote sessions");this.initPeerconnection(e),setTimeout(()=>{this.trigger("connecting"),setTimeout(()=>{this.trigger("accepted")},100),setTimeout(()=>{this.trigger("confirmed")},200)},g)});replaceMediaStream=jest.fn(async e=>{});isEndedInner=!1;constructor({url:e="",mediaStream:t,eventHandlers:r,originator:s,remoteIdentity:a=new c.NameAddrHeader(new c.URI("sip","caller1","test1.com",5060),"Test Caller 1")}){super({originator:s,eventHandlers:r,remoteIdentity:a}),this.url=e,this.initPeerconnection(t)}static setPresentationError(e){this.presentationError=e}static resetPresentationError(){this.presentationError=void 0}static setStartPresentationError(e,{count:t=Number.POSITIVE_INFINITY}={}){this.startPresentationError=e,this.countStartPresentationError=t}static resetStartPresentationError(){this.startPresentationError=void 0,this.countStartPresentationError=Number.POSITIVE_INFINITY,this.countStartsPresentation=0}startPresentation=async e=>{if(i.countStartsPresentation+=1,i.presentationError)throw this.trigger("presentation:start",e),this.trigger("presentation:failed",e),i.presentationError;if(i.startPresentationError&&i.countStartsPresentation<i.countStartPresentationError)throw this.trigger("presentation:start",e),this.trigger("presentation:failed",e),i.startPresentationError;return super.startPresentation(e)};stopPresentation=async e=>{if(i.presentationError)throw this.trigger("presentation:end",e),this.trigger("presentation:failed",e),i.presentationError;return super.stopPresentation(e)};initPeerconnection(e){return e?(this.createPeerconnection(e),!0):!1}createPeerconnection(e){const t=R.createAudioMediaStreamTrackMock();t.id="mainaudio1";const r=[t];if(dt(e)){const a=R.createVideoMediaStreamTrackMock();a.id="mainvideo1",r.push(a)}this.connection=new at(void 0,r),this.addStream(e),setTimeout(()=>{this.trigger("peerconnection",{peerconnection:this.connection})},g)}connect(e){const t=ct(e);setTimeout(()=>{this.url.includes(v)?this.trigger("failed",{originator:"remote",message:"IncomingResponse",cause:"Rejected"}):(this.trigger("connecting"),setTimeout(()=>{this.newInfo({originator:M.Originator.REMOTE,request:{getHeader:r=>r==="content-type"?"application/vinteo.webrtc.roomname":r==="x-webrtc-enter-room"?t:r==="x-webrtc-participant-name"?"Test Caller 1":""}})},100),setTimeout(()=>{this.trigger("accepted")},200),setTimeout(()=>{this.trigger("confirmed")},300))},g)}terminate({status_code:e,cause:t}={}){return this.status_code=e,this.trigger("ended",{status_code:e,cause:t,originator:"local"}),this.isEndedInner=!1,this}async terminateAsync({status_code:e,cause:t}={}){this.terminate({status_code:e,cause:t})}terminateRemote({status_code:e}={}){return this.status_code=e,this.trigger("ended",{status_code:e,originator:"remote"}),this}addStream(e,t="getTracks"){e[t]().forEach(r=>this.connection.addTrack(r))}forEachSenders(e){const t=this.connection.getSenders();for(const r of t)e(r);return t}toggleMuteAudio(e){this.forEachSenders(({track:t})=>{t&&t.kind==="audio"&&(t.enabled=!e)})}toggleMuteVideo(e){this.forEachSenders(({track:t})=>{t&&t.kind==="video"&&(t.enabled=!e)})}mute(e){e.audio&&(this.mutedOptions.audio=!0,this.toggleMuteAudio(this.mutedOptions.audio)),e.video&&(this.mutedOptions.video=!0,this.toggleMuteVideo(this.mutedOptions.video)),this.onmute(e)}unmute(e){e.audio&&(this.mutedOptions.audio=!1),e.video&&(this.mutedOptions.video=!1),this.trigger("unmuted",e)}isMuted(){return this.mutedOptions}onmute({audio:e,video:t}){this.trigger("muted",{audio:e,video:t})}async sendInfo(){}isEnded(){return this.isEndedInner}newInfo(e){this.trigger("newInfo",e)}}class Et{extraHeaders=[];setExtraHeaders(e){this.extraHeaders=e}setExtraContactParams(){}}const d="PASSWORD_CORRECT",T="PASSWORD_CORRECT_2",y="NAME_INCORRECT",h=400,_={url:"wss://sipServerUrl/webrtc/wss/",sip_uri:"sip:sipServerUrl;transport=ws",via_transport:"WSS"},f={status_code:200,reason_phrase:"OK"},A={status_code:401,reason_phrase:"Unauthorized"};class o{static isAvailableTelephony=!0;static startError;static countStartError=Number.POSITIVE_INFINITY;static countStarts=0;events;registratorInner;call=jest.fn((e,t)=>{const{mediaStream:r,eventHandlers:s}=t;return this.session=new i({url:e,mediaStream:r,eventHandlers:s,originator:"local"}),this.session.connect(e),this.session});sendOptions=jest.fn((e,t,r)=>{console.log("sendOptions",e,t,r)});start=jest.fn(()=>{if(o.countStarts+=1,o.startError&&o.countStarts<o.countStartError){this.trigger("disconnected",o.startError);return}this.register()});stop=jest.fn(()=>{this.startedTimeout&&clearTimeout(this.startedTimeout),this.stopedTimeout&&clearTimeout(this.stopedTimeout),this.unregister(),this.isStarted()?this.stopedTimeout=setTimeout(()=>{this.trigger("disconnected",{error:!0,socket:_})},h):this.trigger("disconnected",{error:!0,socket:_})});removeAllListeners=jest.fn(()=>(this.events.removeEventHandlers(),this));once=jest.fn((e,t)=>(this.events.once(e,t),this));startedTimeout;stopedTimeout;session;isRegisteredInner;isConnectedInner;configuration;constructor(e){this.events=new O(D);const[t,r]=e.uri.split(":"),[s,a]=r.split("@"),p={...e,uri:new c.URI(t,s,a)};this.configuration=p,this.registratorInner=new Et}static setStartError(e,{count:t=Number.POSITIVE_INFINITY}={}){o.startError=e,o.countStartError=t}static resetStartError(){o.startError=void 0,o.countStartError=Number.POSITIVE_INFINITY,o.countStarts=0}static setAvailableTelephony(){o.isAvailableTelephony=!0}static setNotAvailableTelephony(){o.isAvailableTelephony=!1}static reset(){o.resetStartError(),o.setAvailableTelephony()}on(e,t){return this.events.on(e,t),this}off(e,t){return this.events.off(e,t),this}trigger(e,t){this.events.trigger(e,t)}terminateSessions(){this.session?.terminate()}set(e,t){return this.configuration[e]=t,!0}register(){this.startedTimeout&&clearTimeout(this.startedTimeout);const{password:e,register:t,uri:r}=this.configuration;t===!0&&r.user.includes(y)?(this.isRegisteredInner=!1,this.isConnectedInner=!1,this.startedTimeout=setTimeout(()=>{this.trigger("registrationFailed",{response:A,cause:c.C.causes.REJECTED})},h)):!this.isRegistered()&&t===!0&&(e===d||e===T)?(this.isRegisteredInner=!0,this.startedTimeout=setTimeout(()=>{this.trigger("registered",{response:f})},h)):t===!0&&e!==d&&e!==T&&(this.isRegisteredInner=!1,this.isConnectedInner=!1,this.startedTimeout=setTimeout(()=>{this.trigger("registrationFailed",{response:A,cause:c.C.causes.REJECTED})},h)),o.isAvailableTelephony?(this.trigger("connected",{socket:_}),this.isConnectedInner=!0):this.stop()}unregister(){this.isRegisteredInner=!1,this.isConnectedInner=!1,this.trigger("unregistered",{response:f})}isRegistered(){return this.isRegisteredInner===!0}isConnected(){return this.isConnectedInner===!0}isStarted(){return this.configuration.register===!0&&this.isRegisteredInner===!0||this.configuration.register!==!0&&this.isConnectedInner===!0}newSipEvent(e){this.trigger("sipEvent",e)}registrator(){return this.registratorInner}}class ht{url;constructor(e){this.url=e}}class ut extends V.EventEmitter{contentType;body;constructor(e,t){super(),this.contentType=e,this.body=t}}const I="remote",mt=(n,e)=>{const t=new S(e),r={originator:I,request:t,info:new ut("","")};n.newInfo(r)},lt=(n,e)=>{const r={event:"sipEvent",request:new S(e)};n.newSipEvent(r)},pt=(n,{incomingNumber:e="1234",displayName:t,host:r})=>{const s=new i({originator:I,eventHandlers:{}}),a=new b("sip",e,r);s.remote_identity=new W(a,t);const p=new S([]);n.trigger("newRTCSession",{originator:I,session:s,request:p})},gt=(n,e)=>{e?n.trigger("failed",e):n.trigger("failed",n)},N={triggerNewInfo:mt,triggerNewSipEvent:lt,triggerIncomingSession:pt,triggerFailIncomingSession:gt,WebSocketInterface:ht,UA:o,C:{INVITE:"INVITE"}},u="user",E="displayName",m="SIP_SERVER_URL",w="SIP_WEB_SOCKET_SERVER_URL",_t=new N.WebSocketInterface(w),C={userAgent:"Chrome",sipServerUrl:m,sipWebSocketServerURL:w},Tt={...C},L={...C,user:u,password:d,register:!0},It={...L,displayName:E},St={...C,displayName:E,register:!1},l={session_timers:!1,sockets:[_t],user_agent:"Chrome",sdpSemantics:"unified-plan",register_expires:300,connection_recovery_max_interval:6,connection_recovery_min_interval:2},Nt={...l,password:d,uri:new c.URI("sip",u,m),display_name:"",register:!0},wt={...l,password:d,uri:new c.URI("sip",u,m),display_name:E,register:!0},Ct={...l,display_name:E,register:!1},Rt={...l,display_name:"",register:!1},F="10.10.10.10",ft=[`X-Vinteo-Remote: ${F}`],At=()=>new M.SipConnector({JsSIP:N});exports.FAILED_CONFERENCE_NUMBER=v;exports.JsSIP=N;exports.NAME_INCORRECT=y;exports.PASSWORD_CORRECT=d;exports.PASSWORD_CORRECT_2=T;exports.SIP_SERVER_URL=m;exports.SIP_WEB_SOCKET_SERVER_URL=w;exports.dataForConnectionWithAuthorization=L;exports.dataForConnectionWithAuthorizationWithDisplayName=It;exports.dataForConnectionWithoutAuthorization=St;exports.dataForConnectionWithoutAuthorizationWithoutDisplayName=Tt;exports.displayName=E;exports.doMockSipConnector=At;exports.extraHeadersRemoteAddress=ft;exports.remoteAddress=F;exports.uaConfigurationWithAuthorization=Nt;exports.uaConfigurationWithAuthorizationWithDisplayName=wt;exports.uaConfigurationWithoutAuthorization=Ct;exports.uaConfigurationWithoutAuthorizationWithoutDisplayName=Rt;exports.user=u;
@@ -1,4 +1,4 @@
1
- import { default as SipConnector } from './SipConnector';
1
+ import { SipConnector } from './SipConnector';
2
2
  export { FAILED_CONFERENCE_NUMBER } from './__fixtures__/RTCSessionMock';
3
3
  export { NAME_INCORRECT, PASSWORD_CORRECT, PASSWORD_CORRECT_2 } from './__fixtures__/UA.mock';
4
4
  export * from './__fixtures__/index';