edgeport - v1.0.3
    Preparing search index...

    Function connect

    • Connects to a SIP server over TCP/TLS and returns a session (not yet registered).

      Call SipSession.register to register (and receive inbound requests), or just SipSession.message / SipSession.options for a stateless request. Use await using (or SipSession.close) to release the connection.

      Parameters

      Returns Promise<SipSession>

      The live session.

      If the connection cannot be established.

      1.0.3

      import { connect } from 'edgeport/sip';

      await using ua = await connect({
      hostname: 'sip.example.com',
      username: 'alice',
      password: env.SIP_PW
      });
      await ua.register();
      await ua.message('bob', 'hello over SIP');
      for await (const m of ua.messages()) console.log(m.from, m.text());