1.1.63 • Published 2 years ago
@voicenter-team/vsip v1.1.63
vsip
A vue based jssip wrapper.
Installation
Using npm:
$ npm i -g npm
$ npm i @voicenter-team/vsipUsage
Firstly use the lib:
import VueJsSIP from '@voicenter-team/vsip';
Vue.use(VueJsSIP, {
store // Vuex store
});This lib will be injected to your Vex as a vsip module.
To init library call init action with the following options:
const options = {
configuration: {
session_timers: Boolean,
uri: String,
password: String,
},
socketInterfaces: [String],
sipDomain: String,
sipOptions: {
session_timers: Boolean,
extraHeaders: [String],
pcConfig: {}
}
}Then you will be able to use getters and call actions.
Actions
async setMediaDevices()- will set up media devicesasync setMicrophone(deviceId: Number)- set passed device as input for callsasync setSpeaker(deviceId: Number)- set passed device as output for callsasync setCurrentActiveRoom(roomId: Number)- move to the roomdoCallHold({callId: Number, toHold: Boolean})- hold/unhold call by iddoCall(target: String)- call to the targetcallTerminate(callId: Number)- terminate callcallTransfer({callId: Number, target: String})- transfer call to targetcallMerge(roomId: Number)- merge calls in specific roomcallAnswer(callId: Number)- answer the callsetMetricConfig(config: Object)- set the metric config (used for audio quality indicator)doMute(muted: Boolean)- set the agent mutenesssetDND(value: Boolean)- set the agent "Do not disturb" statusasync callChangeRoom({callId: Number, roomId: Number})- move call to the roomcallMove({callId: Number, roomId: Number})- Same as callChangeRoom. Move call to the specific roomsubscribe({type: String, listener: function})- subscribe to an event. Available events:new_call,ended,progress,failed,confirmedremoveListener(type: String)- remove event listenerinit({configuration: Object, socketInterfaces: String[], listeners: Array, sipDomain: String, sipOptions: Object})- init the lib
Getters
getActiveRooms: []- returns a list of active roomsgetSipDomain: String- returns sip domaingetSiOptions: Object- returns sip optionsgetInputDeviceList: []- returns list of input devicesgetOutputDeviceList: []- returns list of output devicesgetCurrentActiveRoomId: Number- returns current active room idgetSelectedInputDevice: Number- returns current selected input devicegetSelectedOutputDevice: Number- returns current selected output deviceisDND: Boolean- returns if the agent is in "Do not disturb" statusisMuted: Boolean- returns if the agent is mutedmetricConfig: Object- returns metric config (used for audio quality indicator)
1.1.63
2 years ago
1.1.62
2 years ago
1.1.61
2 years ago
1.1.60
2 years ago
1.1.0
3 years ago
1.0.39
3 years ago
1.1.7
3 years ago
1.0.55
3 years ago
1.1.53
3 years ago
1.1.59
3 years ago
1.0.9
3 years ago
1.0.7
3 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago