Capture network traffic
Это содержимое пока не доступно на вашем языке.
A packet capture records the SIP and media traffic between the switch and a few hosts for a set number of minutes, for example to troubleshoot a vendor’s signalling. dumpIPTraffic schedules the capture and dumpIPTrafficStatus tells you when the dump file is ready. This is the same as System Management → Tools → Network Traffic Capture in the panel. Both methods are available to the root customer only.
dumpIPTraffic
Section titled “dumpIPTraffic”Schedules a capture. The switch e-mails email about the progress.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
email |
string | yes | E-mail address that is told about the status of the capture |
target_hosts |
array | yes | Hosts to capture traffic of, as strings: IP addresses or host names, for example 192.0.2.10 or sip.example.com |
period |
int | yes | Duration of the capture in minutes, 1 to 60 |
interface |
string | yes | Network interface to capture on. In the root environment any interface, for example em0. In another environment the interface together with the environment’s IP address, for example em0:198.51.100.7 |
audit_info |
struct | no | Who schedules the capture, for the audit log; see the audit info structure |
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
result |
string | OK when the capture is scheduled |
i_ip_traffic_dump |
int | ID of the capture |
Example
Section titled “Example”call("dumpIPTraffic", { "email": "noc@example.com", "target_hosts": ["192.0.2.10", "192.0.2.11"], "period": 5, "interface": "em0",}){"result": "OK", "i_ip_traffic_dump": 312}dumpIPTrafficStatus
Section titled “dumpIPTrafficStatus”Returns the state of a capture and, when it has finished, the URL of the dump file.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
i_ip_traffic_dump |
int | yes | ID of the capture |
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
result |
string | OK |
status |
string | pending: not started yet; in_progress: capturing; timed_out: the capture failed |
url |
string | URL of the dump file; returned when the capture has succeeded |
Example
Section titled “Example”call("dumpIPTrafficStatus", {"i_ip_traffic_dump": 312}){"result": "OK", "status": "in_progress"}Related
Section titled “Related”- SIP logs viewer
- Web users permissions: who may open Network Traffic Capture