edgeport - v1.0.3
    Preparing search index...

    Function serializeMessage

    • Serializes a SipMessage to bytes, forcing Content-Length to match the body.

      Parameters

      Returns Uint8Array

      The complete message bytes with CRLF line endings.

      1.0.3

      import { serializeMessage, SipHeaders } from 'edgeport/sip';

      const bytes = serializeMessage({
      kind: 'request',
      method: 'OPTIONS',
      uri: 'sip:example.com',
      headers: new SipHeaders().add('Max-Forwards', '70'),
      body: new Uint8Array(0)
      });