Home > sip.js > Transaction
Transaction.
Signature:
export declare abstract class Transaction
SIP is a transactional protocol: interactions between components take place in a series of independent message exchanges. Specifically, a SIP transaction consists of a single request and any responses to that request, which include zero or more provisional responses and one or more final responses. In the case of a transaction where the request was an INVITE (known as an INVITE transaction), the transaction also includes the ACK only if the final response was not a 2xx response. If the response was a 2xx, the ACK is not considered part of the transaction. https://tools.ietf.org/html/rfc3261\#section-17
Constructor | Modifiers | Description |
---|---|---|
(constructor)(_transport, _user, _id, _state, loggerCategory) | Constructs a new instance of the Transaction class |
Property | Modifiers | Type | Description |
---|---|---|---|
id | string | Transaction id. | |
kind | string | Transaction kind. Deprecated. | |
logger | Logger | ||
state | TransactionState | Transaction state. | |
transport | Transport | Transaction transport. |
Method | Modifiers | Description |
---|---|---|
addStateChangeListener(listener, options) | Sets up a function that will be called whenever the transaction state changes. | |
dispose() | Destructor. Once the transaction is in the "terminated" state, it is destroyed immediately and there is no need to call dispose . However, if a transaction needs to be ended prematurely, the transaction user may do so by calling this method (for example, perhaps the UA is shutting down). No state transition will occur upon calling this method, all outstanding transmission timers will be cancelled, and use of the transaction after calling dispose is undefined. |
|
logTransportError(error, message) | ||
onTransportError(error) | ||
removeStateChangeListener(listener) | Removes a listener previously registered with addStateListener. | |
send(message) | Pass message to transport for transmission. If transport fails, the transaction user is notified by callback to onTransportError(). | |
setState(state) | ||
typeToString() |