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.
await using
Connection and identity options.
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()); Copy
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());
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.