webitel-sdk 0.1.176 → 0.1.178

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.
@@ -30249,6 +30249,12 @@ class SipPhone extends EventEmitter {
30249
30249
  delete this.ua;
30250
30250
  }
30251
30251
  }
30252
+ isRegistered() {
30253
+ if (this.ua) {
30254
+ return this.ua.isRegistered();
30255
+ }
30256
+ return false;
30257
+ }
30252
30258
  sipSessionByCallId(id) {
30253
30259
  for (const sess of this.allSession) {
30254
30260
  if (sess.callId === id) {
@@ -30394,7 +30400,7 @@ async function getMediaStream(constraints) {
30394
30400
 
30395
30401
  const getVersion = () => {
30396
30402
  // @ts-ignore
30397
- return '"0.1.176"';
30403
+ return '"0.1.178"';
30398
30404
  };
30399
30405
  var version$1 = getVersion();
30400
30406
 
@@ -32230,6 +32236,12 @@ class Client extends EventEmitter {
32230
32236
  phone.on('registered', () => this.emit('phone_registered', true));
32231
32237
  phone.on('unregistered', () => this.emit('phone_registered', false));
32232
32238
  }
32239
+ phoneIsRegister() {
32240
+ if (this.phone && this.phone.isRegistered) {
32241
+ return this.phone.isRegistered();
32242
+ }
32243
+ return false;
32244
+ }
32233
32245
  async deviceConfig(name) {
32234
32246
  return this.request(WEBSOCKET_DEFAULT_DEVICE_CONFIG, { name });
32235
32247
  }
@@ -32996,6 +33008,9 @@ class ExternalClient extends ee_3 {
32996
33008
  answer(id) {
32997
33009
  this.exec(id, 'answer');
32998
33010
  }
33011
+ isRegistered() {
33012
+ return false;
33013
+ }
32999
33014
  sipSessionByCallId(id) {
33000
33015
  return new Session$1(this, id);
33001
33016
  }