Structurally diff two SIP messages
diff_sip_messages[cost: free (pure CPU, no network) | read-only, no persistence]
Take two SIP messages (typically the same request observed at two adjacent hops - e.g. the INVITE leaving FreeSWITCH and the INVITE arriving at Kamailio) and surface a structured per-header diff: added, removed, mutated (with old/new value), duplicated (single header → many), de-duplicated, whitespace-only-change, parameter-reorder (Via params, From tag), and body-changed. SDP bodies on both sides are delegated to compareSdp for codec / DTLS / ICE diffs.
Use FIRST when the user has two captures or two log lines that should be carrying the same message and wants to know what an intermediate proxy / SBC / B2BUA changed. Far more reliable than visual inspection.
Pair with: parse_sip_message to inspect either side in isolation; lint_sip_request if the diff reveals the downstream side became malformed; search_sip_docs(vendor=<intermediate>) once you know which hop's behavior is the source of the change.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | Yes | SIP message as observed at the *downstream* hop (e.g. what Kamailio believes it received). | |
| before | Yes | SIP message as observed at the *upstream* hop (e.g. what FreeSWITCH believes it sent). | |
| labelAfter | No | Display label for the downstream side. Default "after". | after |
| labelBefore | No | Display label for the upstream side. Default "before". | before |