edgeport - v1.0.3
    Preparing search index...

    Function encodeMsrp

    • Encodes an MSRP frame (request or response) to bytes.

      Parameters

      Returns Uint8Array

      The complete MSRP frame bytes, including the end-line.

      1.0.3

      import { encodeMsrp } from 'edgeport/sip';

      const bytes = encodeMsrp({
      kind: 'request',
      transactionId: 'abc',
      method: 'SEND',
      headers: { 'To-Path': to, 'From-Path': from, 'Content-Type': 'text/plain' },
      body: new TextEncoder().encode('hi'),
      continuation: '$'
      });