CEL: Expose parking retreiver in extra field

This exposes the retreiver of a parked call under the "retreiver" key
of the extra field when this information is available.

Review: https://reviewboard.asterisk.org/r/3608/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@416148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kinsey Moore
2014-06-13 12:52:38 +00:00
parent 73cf8b2cb8
commit 3984276a6e

View File

@@ -1241,7 +1241,14 @@ static void cel_parking_cb(
break; break;
} }
extra = ast_json_pack("{s: s}", "reason", reason); if (parked_payload->retriever) {
extra = ast_json_pack("{s: s, s: s}",
"reason", reason,
"retriever", parked_payload->retriever->name);
} else {
extra = ast_json_pack("{s: s}", "reason", reason);
}
if (extra) { if (extra) {
cel_report_event(parked_payload->parkee, AST_CEL_PARK_END, NULL, extra, NULL); cel_report_event(parked_payload->parkee, AST_CEL_PARK_END, NULL, extra, NULL);
} }