POST /diag.ashx #
Append client-side diagnostic entries. Used by the conference page’s WebRTC instrumentation to record ICE candidates, connection-state transitions and RTP byte counters. Entries are buffered server-side for the admin diagnostic UI.
Request
application/json body:
{
"entries": [
{ "t": "2026-06-02T19:33:37.388Z",
"s": "<session-id>",
"u": "<user-context>",
"m": "ice-conn state=connected" }
]
}Up to 100 entries per POST.
Response
{ "appended": N } where N is the count actually stored.
Errors
Malformed JSON is silently dropped (returns {appended:0}) so a buggy logger never breaks the page. 500 is the only error you might see, from disk I/O.
Example (verified 2026-06-05)
$ curl -X POST https://phone.codeb.io/diag.ashx \
-H "Content-Type: application/json" \
-d '{"entries":[{"t":"2026-06-05T11:00:00Z","s":"room-abc","u":"alex","m":"ice-conn state=connected"}]}'
{"appended":1}
Recommended JavaScript usage from the conference client itself (kept here for completeness):
navigator.sendBeacon('/diag.ashx',
new Blob([JSON.stringify({entries: queuedEntries})],
{type: 'application/json'}));
X-CodeB-Admin-Signature HMAC header and is therefore not part of the public API — admins read entries back through the IIS web-logs admin page.