update "query" output docs

pull/11/head
Richard Fuchs 11 years ago
parent be500e1ee3
commit c73089596d

@ -712,178 +712,262 @@ The response dictionary contains the following keys:
Contains an integer corresponding to the creation time of this call within the media proxy, Contains an integer corresponding to the creation time of this call within the media proxy,
expressed as seconds since the UNIX epoch. expressed as seconds since the UNIX epoch.
* `streams` * `last signal`
**SUBJECT TO CHANGE** The last time a signalling event (offer, answer, etc) occurred. Also expressed as an integer
UNIX timestamp.
Contains a list of media streams associated with this call. Each list element corresponds to one * `tags`
bi-directional media stream and is itself a list with two elements. The first element of each
sub-list corresponds to side A of the media stream, the second element corresponds to side B. Contains a dictionary. The keys of the dictionary are all the SIP tags (From-tag, To-Tag) known
Each element of the sub-list is a dictionary with the following keys: by *rtpengine* related to this call. One of the keys may be an empty string, which corresponds to
one side of a dialogue which hasn't signalled its SIP tag yet. Each value of the dictionary is
another dictionary with the following keys:
- `created`
UNIX timestamp of when this SIP tag was first seen by *rtpengine*.
- `tag` - `tag`
The SIP tag (either `From` or `To` tag depending on side A or B) Identical to the corresponding key of the `tags` dictionary. Provided to allow for easy
traversing of the dictionary values without paying attention to the keys.
- `in dialogue with`
Contains the SIP tag of the other side of this dialogue. May be missing in case of a
half-established dialogue, in which case the other side is represented by the null-string
entry of the `tags` dictionary.
- `codec` - `medias`
The codec is the media stream, if known. Contains a list of dictionaries, one for each SDP media stream known to *rtpengine*. The
dictionaries contain the following keys:
- `status` + `index`
A human readable description of the stream's status, such as `in kernel` or `unknown peer address`. Integer, sequentially numbered index of the media, starting with one.
- `stats` + `type`
A dictionary with two elements, `rtp` and `rtcp`. Each in turn contains the following keys: Media type as string, usually `audio` or `video`.
+ `counters` + `protocol`
Contains another dictionary with counters (each encoded as integers) for `packets`, If the protocol is recognized by *rtpengine*, this string contains it.
`bytes` and `errors`. Usually `RTP/AVP` or `RTP/SAVPF`.
+ `peer address` + `flags`
Contains a dictionary describing the peer's `family` (address family) as either A list of strings containing various status flags. Contains zero of more
`IPv4` or `IPv6`, the `address` in human-readable string encoding, and `port` of: `initialized`, `rtcp-mux`, `DTLS-SRTP`, `SDES`, `passthrough`, `ICE`.
encoded as integer.
+ `advertised peer address` + `streams`
Identical to `peer address`, but contains whatever endpoint was advertised in the Contains a list of dictionary representing the packet streams associated
SDP body. with this SDP media. Usually contains two entries, one for RTP and one for RTCP.
The keys found in these dictionaries are listed below:
+ `local port` + `local port`
The local port allocated by the media proxy expressed as an integer. Integer representing the local UDP port. May be missing in case of an inactive stream.
+ `endpoint`
Contains a dictionary with the keys `family`, `address` and `port`. Represents the
endpoint address used for packet forwarding. The `family` may be one of `IPv4` or
`IPv6`.
+ `advertised endpoint`
As above, but representing the endpoint address advertised in the SDP body.
+ `crypto suite`
Contains a string such as `AES_CM_128_HMAC_SHA1_80` representing the encryption
in effect. Missing if no encryption is active.
+ `last packet`
UNIX timestamp of when the last UDP packet was received on this port.
+ `flags`
A list of strings with various internal flags. Contains zero or more of:
`RTP`, `RTCP`, `fallback RTCP`, `filled`, `confirmed`, `kernelized,`
`no kernel support`.
+ `stats`
Contains a dictionary with the keys `bytes`, `packets` and `errors`.
Statistics counters for this packet stream.
* `totals` * `totals`
Contains a dictionary with two keys, `input` and `output`. Each value contains a dictionary with two Contains a dictionary with two keys, `RTP` and `RTCP`, each one containing another dictionary
keys, `rtp` and `rtcp`. Each value in turn is identical to the `counters` key described above. identical to the `stats` dictionary described above.
A complete response message might look like this (formatted for readability): A complete response message might look like this (formatted for readability):
{ {
"created": 1373052990, "totals": {
"result": "ok", "RTCP": {
"streams": [ "bytes": 2244,
[ "errors": 0,
{ "packets": 22
"codec": "G711u", },
"stats": { "RTP": {
"rtcp": { "bytes": 100287,
"advertised peer address": { "errors": 0,
"address": "10.76.83.64", "packets": 705
"family": "IPv4", }
"port": 43007 },
}, "last_signal": 1402064116,
"counters": { "tags": {
"bytes": 792, "cs6kn1rloc": {
"errors": 0, "created": 1402064111,
"packets": 12 "medias": [
}, {
"local port": 40059, "flags": [
"peer address": { "initialized"
"address": "10.76.83.64", ],
"family": "IPv4", "streams": [
"port": 43007 {
} "endpoint": {
}, "port": 57370,
"rtp": { "address": "10.xx.xx.xx",
"advertised peer address": { "family": "IPv4"
"address": "10.76.83.64", },
"family": "IPv4", "flags": [
"port": 43006 "RTP",
}, "filled",
"counters": { "confirmed",
"bytes": 265408, "kernelized"
"errors": 0, ],
"packets": 1508 "local port": 30018,
}, "last packet": 1402064124,
"local port": 40058, "stats": {
"peer address": { "packets": 343,
"address": "10.76.83.64", "errors": 0,
"family": "IPv4", "bytes": 56950
"port": 43006 },
} "advertised endpoint": {
} "family": "IPv4",
}, "port": 57370,
"status": "confirmed peer address", "address": "10.xx.xx.xx"
"tag": "Ao5Tg1fidmnZRhn" }
}, },
{ {
"codec": "G711u", "stats": {
"stats": { "bytes": 164,
"rtcp": { "errors": 0,
"advertised peer address": { "packets": 2
"address": "2001:db8::6f24:65b", },
"family": "IPv6", "advertised endpoint": {
"port": 7183 "family": "IPv4",
}, "port": 57371,
"counters": { "address": "10.xx.xx.xx"
"bytes": 624, },
"errors": 0, "endpoint": {
"packets": 12 "address": "10.xx.xx.xx",
}, "port": 57371,
"local port": 40061, "family": "IPv4"
"peer address": { },
"address": "2001:db8::6f24:65b", "last packet": 1402064123,
"family": "IPv6", "local port": 30019,
"port": 7183 "flags": [
} "RTCP",
}, "filled",
"rtp": { "confirmed",
"advertised peer address": { "kernelized",
"address": "2001:db8::6f24:65b", "no kernel support"
"family": "IPv6", ]
"port": 7182 }
}, ],
"counters": { "protocol": "RTP/AVP",
"bytes": 259376, "index": 1,
"errors": 0, "type": "audio"
"packets": 1508 }
}, ],
"local port": 40060, "in dialogue with": "0f0d2e18",
"peer address": { "tag": "cs6kn1rloc"
"address": "2001:db8::6f24:65b", },
"family": "IPv6", "0f0d2e18": {
"port": 7182 "in dialogue with": "cs6kn1rloc",
} "tag": "0f0d2e18",
} "medias": [
}, {
"status": "confirmed peer address", "protocol": "RTP/SAVPF",
"tag": "DiQOJkgsesbFYpC" "index": 1,
} "type": "audio",
] "streams": [
], {
"totals": { "endpoint": {
"input": { "family": "IPv4",
"rtcp": { "address": "10.xx.xx.xx",
"bytes": 792, "port": 58493
"errors": 0, },
"packets": 12 "crypto suite": "AES_CM_128_HMAC_SHA1_80",
}, "local port": 30016,
"rtp": { "last packet": 1402064124,
"bytes": 265408, "flags": [
"errors": 0, "RTP",
"packets": 1508 "filled",
}, "confirmed",
"output": { "kernelized"
"rtcp": { ],
"bytes": 624, "stats": {
"errors": 0, "bytes": 43337,
"packets": 12 "errors": 0,
}, "packets": 362
"rtp": { },
"bytes": 259376, "advertised endpoint": {
"errors": 0, "address": "10.xx.xx.xx",
"packets": 1508 "port": 58493,
} "family": "IPv4"
} }
} },
} {
} "local port": 30017,
"last packet": 1402064124,
"flags": [
"RTCP",
"filled",
"confirmed",
"kernelized",
"no kernel support"
],
"endpoint": {
"family": "IPv4",
"port": 60193,
"address": "10.xx.xx.xx"
},
"crypto suite": "AES_CM_128_HMAC_SHA1_80",
"advertised endpoint": {
"family": "IPv4",
"port": 60193,
"address": "10.xx.xx.xx"
},
"stats": {
"packets": 20,
"bytes": 2080,
"errors": 0
}
}
],
"flags": [
"initialized",
"DTLS-SRTP",
"ICE"
]
}
],
"created": 1402064111
}
},
"created": 1402064111,
"result": "ok"
}
`start recording` Message `start recording` Message
------------------------- -------------------------

Loading…
Cancel
Save