@voicenter-team/opensips-js 1.0.140 → 1.0.142

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/README.md CHANGED
@@ -205,7 +205,7 @@ Also, there are next public fields on OpensipsJS instance:
205
205
  ## Audio
206
206
 
207
207
  ### Audio methods
208
- - `initCall(target: String, addToCurrentRoom: Boolean): void` - call to the target. If addToCurrentRoom is true then the call will be added to the user's current room
208
+ - `initCall(target: String, addToCurrentRoom: Boolean, holdOtherCalls: Boolean): void` - call to the target. If addToCurrentRoom is true then the call will be added to the user's current room
209
209
  - `holdCall(callId: String, automatic?: Boolean): Promise<void>` - put call on hold
210
210
  - `unholdCall(callId: String): Promise<void>` - unhold a call
211
211
  - `terminateCall(callId: String): void` - terminate call
package/dist/index.d.ts CHANGED
@@ -111,6 +111,7 @@ declare class AudioModule {
111
111
  [key: string]: ICall;
112
112
  };
113
113
  get hasActiveCalls(): boolean;
114
+ get hasActiveAnsweredCalls(): boolean;
114
115
  get getActiveRooms(): {
115
116
  [key: number]: IRoom;
116
117
  };
@@ -734,6 +735,8 @@ declare interface MSRPSessionExtended extends MSRPSession_2 {
734
735
 
735
736
  declare type MSRPSessionListener = IncomingMSRPSessionListener | OutgoingMSRPSessionListener;
736
737
 
738
+ declare type OnTransportCallback = (parsed: object, message: string) => void
739
+
737
740
  declare interface OpenSIPSEventMap extends UAEventMap {
738
741
  ready: readyListener
739
742
  connection: connectionListener
@@ -790,12 +793,17 @@ declare class OpenSIPSJS extends UAExtended {
790
793
  private isMSRPInitializingValue;
791
794
  private isReconnecting;
792
795
  private activeConnection;
796
+ private waitingForSessionHangup;
797
+ private waitingForSessionTimeout;
793
798
  audio: AudioModule;
794
799
  msrp: MSRPModule;
795
800
  video: VideoModule;
796
801
  private listenersList;
797
802
  private modules;
798
803
  constructor(options: IOpenSIPSJSOptions, logger?: CustomLoggerType);
804
+ isWaitingForSessionHangup(): boolean;
805
+ stopSessionAfterWaiting(): void;
806
+ private get hasActiveSessions();
799
807
  on<T extends ListenersKeyType>(type: T, listener: ListenerCallbackFnType<T>): this;
800
808
  off<T extends ListenersKeyType>(type: T, listener: ListenerCallbackFnType<T>): this;
801
809
  emit(type: ListenersKeyType, args: any): boolean;
@@ -906,6 +914,7 @@ declare interface TriggerListenerOptions {
906
914
 
907
915
  declare type UAConfigurationExtended = UAConfiguration & {
908
916
  overrideUserAgent?: (userAgent: string) => string
917
+ onTransportCallback?: OnTransportCallback
909
918
  }
910
919
 
911
920
  declare const UAConstructor: typeof UA;
@@ -921,6 +930,7 @@ declare class UAExtended extends UAConstructor implements UAExtendedInterface {
921
930
  _janus_sessions: any[];
922
931
  protected newStreamPlugins: Array<BaseNewStreamPlugin>;
923
932
  protected processStreamPlugins: Array<BaseProcessStreamPlugin>;
933
+ protected onTransportCallback: OnTransportCallback;
924
934
  constructor(configuration: UAConfiguration);
925
935
  call(target: string, options?: CallOptionsExtended): RTCSession;
926
936
  joinVideoCall(target: string, displayName: string, options: VideoConferenceJoinOptions): any;
@@ -947,7 +957,8 @@ declare class UAExtended extends UAConstructor implements UAExtendedInterface {
947
957
  terminateJanusSessions(options: any): void;
948
958
  enableJanusAudio(state: any): void;
949
959
  enableJanusVideo(state: any): void;
950
- stop(): void;
960
+ terminateAllSessions(): void;
961
+ stop(closeSessions?: boolean): void;
951
962
  }
952
963
 
953
964
  declare interface UAExtendedInterface extends UA {