Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 722 Bytes

sip.js.useragent.start.md

File metadata and controls

34 lines (22 loc) · 722 Bytes

Home > sip.js > UserAgent > start

UserAgent.start() method

Start the user agent.

Signature:

start(): Promise<void>;

Returns:

Promise<void>

Remarks

Resolves if transport connects, otherwise rejects. Calling start() after calling stop() will fail if stop() has yet to resolve.

Example

userAgent.start()
  .then(() => {
    // userAgent.isConnected() === true
  })
  .catch((error: Error) => {
    // userAgent.isConnected() === false
  });