Parses a complete SIP message from a byte buffer.
The buffer must contain the whole message: start line, headers, the blank-line separator, and exactly Content-Length body octets. Folded (continuation) header lines are unfolded.
Content-Length
The complete message bytes.
The parsed request or response.
If the start line or header block is malformed.
1.0.3
import { parseMessage, isResponse } from 'edgeport/sip';const msg = parseMessage(raw);if (isResponse(msg)) console.log(msg.status); Copy
import { parseMessage, isResponse } from 'edgeport/sip';const msg = parseMessage(raw);if (isResponse(msg)) console.log(msg.status);
Parses a complete SIP message from a byte buffer.
The buffer must contain the whole message: start line, headers, the blank-line separator, and exactly
Content-Lengthbody octets. Folded (continuation) header lines are unfolded.