@voicenter-team/opensips-js 1.0.72 → 1.0.74
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 +14 -12
- package/dist/index.d.ts +18 -23
- package/dist/opensips-js.cjs.js +1 -1
- package/dist/opensips-js.es.js +57 -51
- package/dist/opensips-js.iife.js +1 -1
- package/dist/opensips-js.umd.js +1 -1
- package/package.json +1 -1
- package/src/types/rtc.d.ts +0 -5
package/README.md
CHANGED
@@ -29,23 +29,25 @@ const openSIPSJS = new OpenSIPSJS({
|
|
29
29
|
Then you will be able to call next methods on openSIPSJS instance:
|
30
30
|
|
31
31
|
### Methods
|
32
|
-
- `
|
32
|
+
- `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
|
33
|
+
- `holdCall(callId: String, automatic?: Boolean): Promise<void>` - put call on hold
|
34
|
+
- `unholdCall(callId: String): Promise<void>` - unhold a call
|
35
|
+
- `terminateCall(callId: String): void` - terminate call
|
36
|
+
- `moveCall({callId: String, roomId: Number}): Promise<void>` - Same as callChangeRoom. Move call to the specific room
|
37
|
+
- `transferCall({callId: String, target: String}): void` - transfer call to target
|
38
|
+
- `mergeCall(roomId: Number): void` - merge calls in specific room. Works only for rooms with 2 calls inside
|
39
|
+
- `answerCall(callId: String): void` - answer a call
|
40
|
+
- `mute(): void` - mute ourself
|
41
|
+
- `unmute(): void` - unmute ourself
|
42
|
+
- `muteCaller(callId: String): void` - mute caller
|
43
|
+
- `unmuteCaller(callId: String): void` - unmute caller
|
33
44
|
- `setMicrophone(deviceId: String): Promise<void>` - set passed device as input device for calls
|
34
45
|
- `setSpeaker(deviceId: String): Promise<void>` - set passed device as output device for calls
|
35
|
-
- `
|
36
|
-
- `doCallHold({callId: Number, toHold: Boolean, automatic: Boolean}): Promise<void>` - hold/unhold call by id
|
37
|
-
- `doCall(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
|
38
|
-
- `callTerminate(callId: String): void` - terminate call
|
39
|
-
- `callTransfer({callId: String, target: String}): void` - transfer call to target
|
40
|
-
- `callMerge(roomId: Number): void` - merge calls in specific room
|
41
|
-
- `callAnswer(callId: String): void` - answer the call
|
42
|
-
- `setMetricsConfig(config: WebrtcMetricsConfigType): void` - set the metric config (used for audio quality indicator)
|
43
|
-
- `doMute(muted: Boolean): void` - set the agent muteness
|
46
|
+
- `setActiveRoom(roomId: Number): Promise<void>` - switch to the room
|
44
47
|
- `setDND(value: Boolean): void` - set the agent "Do not disturb" status
|
45
|
-
- `callChangeRoom({callId: String, roomId: Number}): Promise<void>` - move call to the room
|
46
|
-
- `callMove({callId: String, roomId: Number}): Promise<void>` - Same as callChangeRoom. Move call to the specific room
|
47
48
|
- `subscribe({type: String, listener: function}): void` - subscribe to an event. Available events: `new_call`, `ended`, `progress`, `failed`, `confirmed`
|
48
49
|
- `removeIListener(type: String): void` - remove event listener
|
50
|
+
- `setMetricsConfig(config: WebrtcMetricsConfigType): void` - set the metric config (used for audio quality indicator)
|
49
51
|
|
50
52
|
WebrtcMetricsConfigType
|
51
53
|
|
package/dist/index.d.ts
CHANGED
@@ -123,11 +123,6 @@ declare interface ICallStatus {
|
|
123
123
|
isMerging: boolean
|
124
124
|
}
|
125
125
|
|
126
|
-
declare interface IDoCallParam {
|
127
|
-
target: string
|
128
|
-
addToCurrentRoom: boolean
|
129
|
-
}
|
130
|
-
|
131
126
|
declare interface IMessage extends MSRPSessionExtended {
|
132
127
|
roomId?: number
|
133
128
|
localMuted?: boolean
|
@@ -501,14 +496,12 @@ declare class OpenSIPSJS extends UAExtended {
|
|
501
496
|
};
|
502
497
|
video: boolean;
|
503
498
|
};
|
504
|
-
get getInputDefaultDevice(): MediaDeviceInfo;
|
505
|
-
get getOutputDefaultDevice(): MediaDeviceInfo;
|
506
499
|
get selectedInputDevice(): string;
|
507
500
|
get selectedOutputDevice(): string;
|
508
501
|
get activeStream(): MediaStream;
|
509
502
|
private setAvailableMediaDevices;
|
510
503
|
updateDeviceList(): Promise<void>;
|
511
|
-
|
504
|
+
private initializeMediaDevices;
|
512
505
|
setCallTime(value: ITimeData): void;
|
513
506
|
removeCallTime(callId: string): void;
|
514
507
|
private setTimeInterval;
|
@@ -518,16 +511,16 @@ declare class OpenSIPSJS extends UAExtended {
|
|
518
511
|
setMetricsConfig(config: WebrtcMetricsConfigType): void;
|
519
512
|
sendDTMF(callId: string, value: string): void;
|
520
513
|
private setIsMuted;
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
514
|
+
private processMute;
|
515
|
+
mute(): void;
|
516
|
+
unmute(): void;
|
517
|
+
private processHold;
|
518
|
+
holdCall(callId: string, automatic?: boolean): Promise<void>;
|
519
|
+
unholdCall(callId: string): Promise<void>;
|
527
520
|
private cancelAllOutgoingUnanswered;
|
528
|
-
|
521
|
+
answerCall(callId: string): void;
|
529
522
|
msrpAnswer(callId: string): void;
|
530
|
-
|
523
|
+
moveCall(callId: string, roomId: number): Promise<void>;
|
531
524
|
updateCall(value: ICall): void;
|
532
525
|
updateMSRPSession(value: IMessage): void;
|
533
526
|
updateRoom(value: IRoomUpdate): void;
|
@@ -549,14 +542,16 @@ declare class OpenSIPSJS extends UAExtended {
|
|
549
542
|
private muteReconfigure;
|
550
543
|
private roomReconfigure;
|
551
544
|
private doConference;
|
552
|
-
|
553
|
-
|
545
|
+
private processCallerMute;
|
546
|
+
muteCaller(callId: string): void;
|
547
|
+
unmuteCaller(callId: string): void;
|
548
|
+
terminateCall(callId: string): void;
|
554
549
|
messageTerminate(callId: string): void;
|
555
|
-
|
556
|
-
|
550
|
+
transferCall(callId: string, target: string): Error;
|
551
|
+
mergeCall(roomId: number): void;
|
557
552
|
setDND(value: boolean): void;
|
558
553
|
private startCallTimer;
|
559
|
-
|
554
|
+
setActiveRoom(roomId: number | undefined): Promise<void>;
|
560
555
|
private getNewRoomId;
|
561
556
|
subscribe(type: string, listener: (c: RTCSessionExtended) => void): void;
|
562
557
|
removeIListener(value: string): void;
|
@@ -586,10 +581,10 @@ declare class OpenSIPSJS extends UAExtended {
|
|
586
581
|
private stopVUMeter;
|
587
582
|
setupStream(): Promise<void>;
|
588
583
|
private triggerAddStream;
|
589
|
-
|
584
|
+
initCall(target: string, addToCurrentRoom: boolean): void;
|
590
585
|
initMSRP(target: string, body: string, options: any): void;
|
591
586
|
sendMSRP(msrpSessionId: string, body: string): void;
|
592
|
-
private
|
587
|
+
private processRoomChange;
|
593
588
|
}
|
594
589
|
export default OpenSIPSJS;
|
595
590
|
|