<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [Transport](./sip.js.transport.md) &gt; [onMessage](./sip.js.transport.onmessage.md)

## Transport.onMessage property

Callback on receipt of a message.

<b>Signature:</b>

```typescript
onMessage: ((message: string) => void) | undefined;
```

## Remarks

When the `UserAgent` is constructed, this property is set. The `state` MUST be "Connected" when this is called.

