Skip to main content

@dialstack/sdk-dev / native/src / createPhone

Function: createPhone()

TypeScript
function createPhone(options): DialStackPhone;

Defined in: sdk/native/src/bridge/createPhone.ts:28

The process's one phone.

Module scope is the correct scope, not a shortcut: a push wake and the UI run in the same JS runtime but enter from different places (a headless task, the app window), so this is a plain shared reference. Two phones would register the same SIP AOR twice and the call would go to whichever registered last while the UI watched the other — a silent failure, so a second construction fails loudly instead. Construct eagerly at app entry: new DialStackPhone() does no I/O (only connect() does).

Parameters​

options​

CreatePhoneOptions

Returns​

DialStackPhone