When used different application servers like:
1) kamailio;
2) freeswitch;
3) crm

Required correlate logs and events between all daemons.
For such purposes can be used tracing (OpenTelementry, Zipkin).

An example for Envoy tracking can look like

POST /api/v2/spans HTTP/1.1

host: zipkin

content-type: application/json

x-envoy-internal: true

x-forwarded-for: 217.12.247.98

x-envoy-expected-rq-timeout-ms: 5000

transfer-encoding: chunked


2ad

[{"tags":{"upstream_cluster":"dynamic_forward_proxy_cluster","component":"proxy","response_flags":"DC","peer.address":"127.0.0.1","http.method":"CONNECT","http.protocol":"HTTP/1.1","downstream_cluster":"-","user_agent":"curl/7.85.0","request_size":"842","guid:x-request-id":"0456e862-4cf7-9ee2-b280-e6f59965a70d","upstream_cluster.name":"dynamic_forward_proxy_cluster","http.status_code":"200","response_size":"3750"},"name":"ifconfig.net:443","annotations":[{"timestamp":1688924085239932,"value":"ss"}],"kind":"SERVER","localEndpoint":{"port":0,"ipv4":"217.12.247.98"},"timestamp":1688924084352715,"shared":true,"traceId":"67480febdcdd48dc","duration":886997,"id":"67480febdcdd48dc"}]

0


HTTP/1.1 202 Accepted

content-length: 0

server: Armeria/1.17.2

date: Sun, 9 Jul 2023 17:34:47 GMT



where json body looks like
[
  {
    "tags": {
      "upstream_cluster": "dynamic_forward_proxy_cluster",
      "component": "proxy",
      "response_flags": "DC",
      "peer.address": "127.0.0.1",
      "http.method": "CONNECT",
      "http.protocol": "HTTP/1.1",
      "downstream_cluster": "-",
      "user_agent": "curl/7.85.0",
      "request_size": "842",
      "guid:x-request-id": "0456e862-4cf7-9ee2-b280-e6f59965a70d",
      "upstream_cluster.name": "dynamic_forward_proxy_cluster",
      "http.status_code": "200",
      "response_size": "3750"
    },
    "name": "ifconfig.net:443",
    "annotations": [
      {
        "timestamp": 1688924085239932,
        "value": "ss"
      }
    ],
    "kind": "SERVER",
    "localEndpoint": {
      "port": 0,
      "ipv4": "217.12.247.98"
    },
    "timestamp": 1688924084352715,
    "shared": true,
    "traceId": "67480febdcdd48dc",
    "duration": 886997,
    "id": "67480febdcdd48dc"
  }
]


I looking to create a task for the team developer to develop a module like "tracing_zipkin". This module should allow trace transactions and dialogs
  1. request and response timing;
  2. dialog start-stop events;
  3. business logic like call hold/unhold, media added//removed (video, text, message, audio), request multipart content raw or filtered.

I will appreciate it if you share your thoughts about how JSON POST should look.

Sergey Safarov