srvScripts SDP offer/answer comparator: example pack
Expected results, produced by the comparator and checked against the hand-written expectation for each case.
Cases 02-08 are synthetic (documentation addresses, fake keys). Case 01 is a real lab capture.

== 01-lab-pcmu-pcma: Real capture, FreePBX 17 lab (Asterisk 22.11), 18 Oct 2026: offer PCMU+PCMA, answer PCMU+PCMA
Expected: OK: first common codec PCMU, PCMA also accepted; INFO: no telephone-event, loopback addresses. RTP captured on the same call: payload type 8 (PCMA) in both directions
Comparator output:
INFO m=audio #1: neither side offers telephone-event (RFC 4733 DTMF).
INFO m=audio #1: the offer media address 127.0.0.1 is a loopback address: only valid when both ends run on the same machine (a lab or a local test).
INFO m=audio #1: the answer media address 127.0.0.1 is a loopback address: only valid when both ends run on the same machine (a lab or a local test).
OK m=audio #1: first common codec in the answer: PCMU/8000 (payload type 0); also accepted: PCMA/8000. RTP/AVP, 127.0.0.1:14202. Only the RTP stream shows which codec is actually sent.

== 02-hold-dtmf-missing: Answer puts the call on hold (sendonly) and drops telephone-event
Expected: OK: first common codec PCMA; WARN: sendrecv / sendonly (hold, one-way audio); WARN: telephone-event only in the offer
Comparator output:
WARN m=audio #1: the offer supports RFC 4733 DTMF (telephone-event) but the answer does not: keypresses fall back to in-band audio or SIP INFO, and IVR menus may not react.
WARN m=audio #1: media is sendrecv / sendonly: audio flows in one direction or not at all. This is how hold works; outside a hold it explains one-way or no audio.
OK m=audio #1: first common codec in the answer: PCMA/8000 (payload type 8). RTP/AVP, 198.51.100.20:50000. Only the RTP stream shows which codec is actually sent.

== 03-no-common-codec: Offer has only G.729, answer only PCMU: 488 or silence
Expected: FAIL: no common codec
Comparator output:
FAIL m=audio #1: no common codec: the answer offers PCMU/8000, the offer G729/8000.
WARN m=audio #1: the answer lists PCMU/8000, which the offer did not include.
INFO m=audio #1: neither side offers telephone-event (RFC 4733 DTMF).

== 04-srtp-vs-rtp: Offer requires SRTP (SDES), answer is plain RTP
Expected: FAIL: transport differs (RTP/SAVP against RTP/AVP); FAIL: no a=crypto in the answer
Comparator output:
FAIL m=audio #1: transport differs: offer RTP/SAVP, answer RTP/AVP. Typical cause: one side requires SRTP (SAVP) and the other offers plain RTP, which ends in 488 Not Acceptable Here or no audio.
INFO m=audio #1: neither side offers telephone-event (RFC 4733 DTMF).
FAIL m=audio #1: the offer uses SDES-SRTP (a=crypto) but the answer has no a=crypto line.

== 05-rejected-video: Answer accepts audio and rejects video with port 0 (valid)
Expected: OK: audio #1 PCMU; WARN: video #2 rejected by the answer
Comparator output:
INFO m=audio #1: neither side offers telephone-event (RFC 4733 DTMF).
OK m=audio #1: first common codec in the answer: PCMU/8000 (payload type 0). RTP/AVP, 198.51.100.20:50000. Only the RTP stream shows which codec is actually sent.
WARN m=video #2: the answer rejected this stream (port 0).

== 06-dtmf-payload-renumbered: telephone-event offered as 101, answered as 96
Expected: OK: PCMU; WARN: payload type 96 in the answer but 101 in the offer
Comparator output:
WARN m=audio #1: telephone-event/8000 uses payload type 96 in the answer but 101 in the offer. Allowed, but some devices only decode the number they offered (RFC 3264 says the answer SHOULD reuse it).
OK m=audio #1: first common codec in the answer: PCMU/8000 (payload type 0). RTP/AVP, 198.51.100.20:50000. Only the RTP stream shows which codec is actually sent.

== 07-webrtc-dtls-ice: WebRTC style: Opus over DTLS-SRTP with ICE and rtcp-mux (no problem expected)
Expected: OK: opus/48000/2, no FAIL
Comparator output:
INFO m=audio #1: neither side offers telephone-event (RFC 4733 DTMF).
OK m=audio #1: first common codec in the answer: opus/48000/2 (payload type 111). UDP/TLS/RTP/SAVPF, 198.51.100.20:9. Only the RTP stream shows which codec is actually sent.

== 08-broken-port: Answer has an impossible port (99999): reported as broken SDP, not compared
Expected: FAIL: port "99999" is not valid
Comparator output:
FAIL m=audio #1: the port "99999" is not a number from 0 to 65535.
