Call tracing and log collection
- Requests
- Receiving call data
- Deleting call data
- Receiving closures by call
- Obtaining closure on a call across all roles
- Building trn logs
- Collection of trn logs for the last N sec
- Building a call activity diagram
- Building a diagram of call activity based on the previously collected archive with logs
- Collecting scenario logs
- starttrace
- stoptrace
- cleartrace
- downloadtrace
- whereis
- processnode
- processinfo
- processstatistics
- processdebug
Requests
| HTTP verb | Endpoint | Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Building a diagram of call activity based on the previously collected archive with logs |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Receiving call data
Domain Type: any
Information about parties of calls processed in the system for the last 20 minutes. Data from incoming sip requests are used to generate the result (invite packets).
Response
HTTP/1.1 200 OK
{
"resultcode": 0,
"resultmsg": "OK",
"data": [
{
"site": "central",
"servers": [
{
"srvidx": 10,
"role": "b2bua",
"node": "b2bua1@192.168.0.84",
"addr": "192.168.0.84",
"online": true,
"calls": [
{
"callid": "1870585125@192.168.0.204",
"from": "<sip:sip1@test.ceceron.ru>",
"remoteip": "192.168.0.84",
"tick": 1573719378842,
"time": "2019-11-14T08:16:18.84+00:00",
"to": "<sip:13@test.ceceron.ru>",
"media": {
"mgc": "r_mgc_3",
"mgc_srvidx": 4,
"mgc_node": "mgc1@192.168.0.84",
"mg": "rtx_mg_192.168.0.84_def_804",
"msid": "rDlg-00A-RW0JeV_O9rV",
"ctx": 447234580
}
}
]
},
{
"srvidx": 30,
"role": "sg",
"node": "mix1ws1gate2@192.168.0.84",
"addr": "192.168.0.84",
"online": true,
"calls": [
{
"callid": "rB2-00A-RW0JeV-01-1870585125@192.168.0.204",
"from": "<sip:11@test.ceceron.ru>",
"remoteip": "192.168.0.84",
"tick": 1573719378950,
"time": "2019-11-14T08:16:18.95+00:00",
"to": "<sip:sip3@test.ceceron.ru>"
},
{
"callid": "1870585125@192.168.0.204",
"from": "<sip:sip3@test.ceceron.ru>",
"remoteip": "192.168.0.84",
"tick": 1573719380369,
"time": "2019-11-14T08:16:20.36+00:00",
"to": "\"test_sip1\" <sip:sip1@test.ceceron.ru>"
}
]
}
]
}
]
}
| Name | Description |
|---|---|
|
Role ID (roleid). |
|
Role type. |
|
The node on which the role is running. |
|
Node address. |
|
Availability of node for statistics collection. |
|
Call shoulders served by the role. |
|
callid sides A. |
|
uri sides A |
|
B side address. |
|
Timestamp (in ms) of receiving the request. |
|
Time of receipt of request. |
|
uri B sides. |
|
Media usage data. |
|
Role key mgc serving side of the call |
|
Role ID (roleid) mgc. |
|
Noda mgc. |
|
Key of the role used mg. |
|
Media owner’s sip ID. |
|
Context number. |
Deleting call data
Domain type: master
Deleting call information temporarily placed in the trace cache.
Data is automatically deleted after 3 hours from the time of posting.
Response
HTTP/1.1 200 OK
{
"resultcode": 0,
"resultmsg": "OK",
"data": [
{
"site": "central",
"servers": [
{
"srvidx": 10,
"role": "b2bua",
"node": "b2bua1@192.168.0.84",
"addr": "192.168.0.84",
"online": true,
"result": true
},
{
"srvidx": 30,
"role": "sg",
"node": "mix1ws1gate2@192.168.0.84",
"addr": "192.168.0.84",
"online": true,
"result": true
}
]
}
]
}
| Name | Description |
|---|---|
|
Role ID (roleid). |
|
Role type. |
|
The node on which the role is running. |
|
Node address. |
|
Availability of node for statistics collection. |
|
Result of the operation. |
Receiving closures by call
Domain type: master
Search for related callid in binding to each instance of microservices responsible for SIP signaling (b2b, esg, sg, ivr, conf, prompt).
Related are considered:
-
all shoulders of a single dialog (including parallel call forks, intercepts, forwarding);
-
chains of translated calls (REFER requests and headers) Referred-By);
-
shoulders of spoofed calls (headers Replaces);
-
external callids cut off by microservice esg.
Closure is constructed by chain discovery of the entire closed group of connected callid.
The closure data is stored in the cache for 3 hours, after which it is automatically deleted. After partial deletion of linkage information from microservices caches, the closure is narrowed down.
The return value contains an enumeration of all the SIP microservices, each of which is correlated with those callid values from the closure that passed through it.
Request
| Specification | Description |
|---|---|
|
Callid to be searched. |
|
Comma separated list of callid to be searched by. |
GET /api/monitor/v1/trace/closure?callid=2354976089@192.168.0.204 HTTP/1.1
Response
HTTP/1.1 200 OK
{
"resultcode": 0,
"resultmsg": "OK",
"data": [
{
"site": "central",
"servers": [
{
"srvidx": 10,
"role": "b2bua",
"node": "b2bua1@192.168.0.84",
"addr": "192.168.0.84",
"online": true,
"closure": [
"2354976089@192.168.0.204",
"rB2-00A-DV5ylJ-01-2354976089@192.168.0.204"
]
},
{
"srvidx": 30,
"role": "sg",
"node": "mix1ws1gate2@192.168.0.84",
"addr": "192.168.0.84",
"online": true,
"closure": [
"2354976089@192.168.0.204"
]
}
]
}
]
}
| Name | Description |
|---|---|
|
Role ID (roleid). |
|
Role type. |
|
The node on which the role is running. |
|
Node address. |
|
Availability of node for statistics collection. |
|
List of related callids within a role. |
Obtaining closure on a call across all roles
Domain type: master
Search for related callid across all instances of microservices responsible for SIP signaling (b2b, esg, sg, ivr, conf, prompt).
Related are considered:
-
all shoulders of a single dialog (including parallel call forks, intercepts, forwarding);
-
chains of translated calls (REFER requests and headers) Referred-By);
-
shoulders of spoofed calls (headers Replaces);
-
external callids cut off by microservice esg.
Closure is constructed by chain discovery of the entire closed group of connected callid.
The closure data is stored in the cache for 3 hours, after which it is automatically deleted. After partial deletion of linkage information from microservices caches, the closure is narrowed down.
The return value contains a total list of all the entries in the closure callid.
Building trn logs
Domain Type: any
Trn logs from all sip roles in the system are collected based on a closure built on the specified callid or group callids.
The result is returned in the selected format ('format'):
-
A sequence diagram where the actors are all the devices and microservices that participated in call servicing and are mentioned in the logs.
-
An archive with trn logs of all participating microservice instances responsible for SIP signaling and participating in the service of at least one callid from the closure.
Adequate assembly of logs is possible only:
-
within the last 3 hours, since it is built based on closures, which in turn are built based on the links between callids stored in the cache for just over 3 hours.
-
based on data from microservices where trn logging is enabled (parameter 'log_trn' of the microservice in configuration).
Request
| Specification | Description |
|---|---|
|
Callid to be searched. |
|
Comma separated list of callid to be searched by. |
|
Result return format. Possible values:
You can save a diagram created in svg format. |
GET /api/monitor/v1/trace/trn?callid=2627900225@192.168.0.204&mode=logs HTTP/1.1
Collection of trn logs for the last N sec
Collect logs for the last N seconds from all microservices instances serving SIP signaling.
Assembly is possible only on those microservices where trn logging is enabled (microservice 'log_trn' parameter in configuration).
Request
| Specification | Description |
|---|---|
|
Callid to be searched. |
|
Comma separated list of callid to be searched by. |
|
Number of seconds into the past. Possible values: from 1 to 3600 inclusive. |
GET /api/monitor/v1/trace/trn_sec?callid=3935249258@192.168.0.204 HTTP/1.1
Building a call activity diagram
Domain Type: any
Forming a UML diagram of the sequence from trn logs of all microservices instances serving SIP signaling.
Actors are all devices and microservices that participated in call servicing and are mentioned in the logs.
Adequate assembly of logs is possible only:
-
within the last 3 hours, since it is built based on closures, which in turn are built based on the links between callids stored in the cache for just over 3 hours.
-
based on data from microservices where trn logging is enabled (parameter 'log_trn' of the microservice in configuration).
In order for the saved diagram to be clickable, it should be saved in the mode "Webpage, complete".
You can also manually place a js directory with the two libraries referenced by the html page.
You need to download these files, place them in the 'js' directory next to the html page, and in the html content, replace the paths to the js libraries (e.g., from '/js/…' to './js/…').
Request
| Specification | Description |
|---|---|
|
Callid to be searched. |
|
Comma separated list of callid to be searched by. |
|
Result return format. Possible values:
|
GET /api/monitor/v1/trace/activity_diagram?callid=2627900225@192.168.0.204&mode=svg HTTP/1.1
Building a diagram of call activity based on the previously collected archive with logs
Domain Type: any
Forming UML sequence diagram from the archive with trn logs collected earlier, including on another instance of the system, using a query /api/monitor/v1/trace/trn?mode=logs.
Actors are all devices and microservices that participated in call servicing and are mentioned in the logs.
In order for the saved diagram to be clickable, it should be saved in the mode "Webpage, complete".
You can also manually place a js directory with the two libraries referenced by the html page.
You need to download these files, place them in the 'js' directory next to the html page, and in the html content, replace the paths to the js libraries (e.g., from '/js/…' to './js/…').
Collecting scenario logs
Collect logs of the specified type of scenarios from roles at the current site.
Request
| Specification | Description |
|---|---|
|
Type of scenario for which logs should be collected. Possible values: ivr, svc. |
|
Number of minutes in the past. |
|
The duration of the log for assembly in minutes. Possible values from 1 to 1440. |
|
The code of the scenario for which the logs should be collected. |
GET /api/monitor/v1/trace/scripts?type=svc&start=60&duration=30 HTTP/1.1