SipNode class

Signature:

export declare class SipNode extends AutoProcessorMediaNode<"audio">

Extends: AutoProcessorMediaNode<"audio">

Methods

Method Modifiers Description

answer()

Answer an inbound call the node is holding (only meaningful with inbound: "manual", after onIncomingCall). Harmless if the node is not holding a call. Media then flows exactly as for an outbound call.

dial(address)

Place a call. A node carries one call at a time: from here until that call has disconnected — however it ends — a further dial() is refused (onDialRejected, reason busy) rather than hanging up the call in progress. Once it has disconnected the node is idle and can dial again, to the same address or another; the node, its id and its subscriptions are unchanged throughout.

The call’s progress arrives through onStatus (and onDisconnect when it ends); a dial() that places no call at all, through onDialRejected.

hangup(reason)

Hang up the current call. Harmless when there is none.

This does not wait for the far end: the node reports disconnected (with onDisconnect code 200 for an established call, 487 for one that had not been answered) and can dial again straight away, while the SIP exchange completes in the background — even if the far end never answers it.

reject(code, reason)

Reject an inbound call the node is holding (only meaningful with inbound: "manual", after onIncomingCall). Harmless if the node is not holding a call.

sendDtmf(digits)

Send a sequence of DTMF digits, via RFC2833 (if supported by the peer)