1.1.63 • Published 2 months ago

@voicenter-team/vsip v1.1.63

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

vsip

A vue based jssip wrapper.

Installation

Using npm:

$ npm i -g npm
$ npm i @voicenter-team/vsip

Usage

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 devices
  • async setMicrophone(deviceId: Number) - set passed device as input for calls
  • async setSpeaker(deviceId: Number) - set passed device as output for calls
  • async setCurrentActiveRoom(roomId: Number) - move to the room
  • doCallHold({callId: Number, toHold: Boolean}) - hold/unhold call by id
  • doCall(target: String) - call to the target
  • callTerminate(callId: Number) - terminate call
  • callTransfer({callId: Number, target: String}) - transfer call to target
  • callMerge(roomId: Number) - merge calls in specific room
  • callAnswer(callId: Number) - answer the call
  • setMetricConfig(config: Object) - set the metric config (used for audio quality indicator)
  • doMute(muted: Boolean) - set the agent muteness
  • setDND(value: Boolean) - set the agent "Do not disturb" status
  • async callChangeRoom({callId: Number, roomId: Number}) - move call to the room
  • callMove({callId: Number, roomId: Number}) - Same as callChangeRoom. Move call to the specific room
  • subscribe({type: String, listener: function}) - subscribe to an event. Available events: new_call, ended, progress, failed, confirmed
  • removeListener(type: String) - remove event listener
  • init({configuration: Object, socketInterfaces: String[], listeners: Array, sipDomain: String, sipOptions: Object}) - init the lib

Getters

  • getActiveRooms: [] - returns a list of active rooms
  • getSipDomain: String - returns sip domain
  • getSiOptions: Object - returns sip options
  • getInputDeviceList: [] - returns list of input devices
  • getOutputDeviceList: [] - returns list of output devices
  • getCurrentActiveRoomId: Number - returns current active room id
  • getSelectedInputDevice: Number - returns current selected input device
  • getSelectedOutputDevice: Number - returns current selected output device
  • isDND: Boolean - returns if the agent is in "Do not disturb" status
  • isMuted: Boolean - returns if the agent is muted
  • metricConfig: Object - returns metric config (used for audio quality indicator)
1.1.63

2 months ago

1.1.62

2 months ago

1.1.61

7 months ago

1.1.60

9 months ago

1.1.0

2 years ago

1.0.39

2 years ago

1.1.7

2 years ago

1.0.55

2 years ago

1.1.53

2 years ago

1.1.59

2 years ago

1.0.9

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago