<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [TransactionUser](./sip.js.transactionuser.md) &gt; [onStateChange](./sip.js.transactionuser.onstatechange.md)

## TransactionUser.onStateChange property

Callback for notification of transaction state changes.

Not called when transaction is constructed, so there is no notification of entering the initial transaction state. Otherwise, called once for each transaction state change. State changes adhere to the following RFCs. https://tools.ietf.org/html/rfc3261\#section-17 https://tools.ietf.org/html/rfc6026

<b>Signature:</b>

```typescript
onStateChange?: (newState: TransactionState) => void;
```
