Make an outgoing call. Requires you to be registered to a sip server.
Returns a promise which resolves as soon as the connected sip server emits a progress response, or rejects when something goes wrong in that process.
For example "sip:497920039@optimaccs.com"
To setup a different voip account, sipserver or media devices. If you want to adapt media devices it is better to do it on-the-fly by adapting the media property on client (to change it globally) or by adapting the media property on session.
When receiving an invite, a (frozen) proxy session is returned which can be used to display what is needed in your interface.
client.on('invite', session => {
const { number, displayName } = session.remoteIdentity;
// accept the incoming session after 5 seconds.
setTimeout(() => session.accept(), 5000)
await session.accepted();
// session is accepted!
// terminate the session after 5 seconds.
setTimeout(() => session.terminate(), 5000)
})
When a session is added to the sessions by an incoming or outgoing call, a sessionAdded event is emitted.
When a session is removed because it is terminated a sessionRemoved event is emitted.
Generated using TypeDoc
information about client